[PHP] read file

2001-11-23 Thread PHP Newbie

hi,
i have a file with ips inside

192.168.1.1
192.168.1.2
...

now i must write that in a html table with php.
i think that is easy, but i'm a newbie and don't find anything how to do it.

please help me

thx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] read file

2001-11-23 Thread Andrey Hristov

$content = file('file_name.txt');
$HTML .='table';
foreach ($content as $v){
$HTML .='trtd'.$v.'/td/tr';
}
$HTML .='/table';
echo $HTML;

Regards
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: PHP Newbie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 23, 2001 11:00 AM
Subject: [PHP] read file


 hi,
 i have a file with ips inside
 
 192.168.1.1
 192.168.1.2
 ...
 
 now i must write that in a html table with php.
 i think that is easy, but i'm a newbie and don't find anything how to do it.
 
 please help me
 
 thx
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP_REFERER

2001-11-23 Thread Jordan Elver

Hi,
I'm writing a 404 handler and in order to report the item that was requested 
I was trying to get the value of HTTP_REFERER. But, it does seem to get set. 
Does anyone know how to find thi value? Is there a reason why it would not 
get set?

TIA,

Jord
-- 
Jordan Elver
Web Developer
http://www.theinternetone.co.uk
Carpe Aptenodytes! (Seize the Penguins!)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_REFERER

2001-11-23 Thread gaouzief

hi

reasons why it couldn't be set:

the url was typed directly

some browser don't send referer information

other (like opera 5.12) send a wrong value

you shouldn't rely on HTTP_REFERER too much


regards

hassan el forkani
http://WarmAfrica.com

23/11/2001 11:55:04, Jordan Elver [EMAIL PROTECTED] wrote:

Hi,
I'm writing a 404 handler and in order to report the item that was requested 
I was trying to get the value of HTTP_REFERER. But, it does seem to get set. 
Does anyone know how to find thi value? Is there a reason why it would not 
get set?

TIA,

Jord
-- 
Jordan Elver
Web Developer
http://www.theinternetone.co.uk
Carpe Aptenodytes! (Seize the Penguins!)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_REFERER

2001-11-23 Thread Sebastian Wenleder

Hi Jord,

You don't need to get HTTP_REFERER, in order to know what the client 
requested! And every browser stores some other info in HTTP_REFERER...
The filename that was reqested is stored in $REQUEST_URI

Best,
Sebastian

Hi,
I'm writing a 404 handler and in order to report the item that was requested
I was trying to get the value of HTTP_REFERER. But, it does seem to get set.
Does anyone know how to find thi value? Is there a reason why it would not
get set?

TIA,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] HTTP_REFERER

2001-11-23 Thread Matt Williams

 Hi,
 I'm writing a 404 handler and in order to report the item that 
 was requested 
 I was trying to get the value of HTTP_REFERER. But, it does seem 
 to get set. 
 Does anyone know how to find thi value? Is there a reason why it 
 would not 
 get set?
 

Hi 

I think you're looking for this

$HTTP_SERVER_VARS[REQUEST_URI]

M:

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_REFERER

2001-11-23 Thread Jordan Elver

On Friday 23 November 2001 13:39, you wrote:
 Are you using it as

 $HTTP_SERVER_VARS[REQUEST_URI]

 or

 $REQUEST_URI

 ?

Well, I think I'm buggered then because i just tried to use both and they 
both report the same value :-(

Back to the drawing board.

 I had the same problem using the latter. The former displays properly.
 Other than that I can't remember if I changed anything else

 M:

-- 
Jordan Elver
Web Developer
http://www.theinternetone.co.uk
Unix is not a A-ha experience, it is more of a holy-shit experience. --- 
Colin McFadyen in alt.folklore.computers

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] read file

2001-11-23 Thread Alberto Mucignat

Il ven, 23 nov 2001, hai scritto:
 hi,
 andrey hristov told me how to read a file and put it into a table (thx)
 but now i see that i need the data in an array.
 can somebody help me please?

just use the first line of Andrey:

$content = file('file_name.txt');

file function reads entire file into an array (from the manual).


bye, alberto.

 
 thx
 
 On Friday 23 November 2001 10:16, Andrey Hristov wrote:
  $content = file('file_name.txt');
  $HTML .='table';
  foreach ($content as $v){
  $HTML .='trtd'.$v.'/td/tr';
  }
  $HTML .='/table';
  echo $HTML;
 
  Regards
  Andrey Hristov
  IcyGEN Corporation
  http://www.icygen.com
  BALANCED SOLUTIONS
 
 
  - Original Message -
  From: PHP Newbie [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, November 23, 2001 11:00 AM
  Subject: [PHP] read file
 
   hi,
   i have a file with ips inside
  
   192.168.1.1
   192.168.1.2
   ...
  
   now i must write that in a html table with php.
   i think that is easy, but i'm a newbie and don't find anything how to do
   it.
  
   please help me
  
   thx
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Alberto Mucignat
Direttore Tecnico
Studenti.it - il network degli studenti
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] read file

2001-11-23 Thread Thomas Fischbach

hi,
andrey hristov told me how to read a file and put it into a table (thx)
but now i see that i need the data in an array.
can somebody help me please?

thx

On Friday 23 November 2001 10:16, Andrey Hristov wrote:
 $content = file('file_name.txt');
 $HTML .='table';
 foreach ($content as $v){
 $HTML .='trtd'.$v.'/td/tr';
 }
 $HTML .='/table';
 echo $HTML;

 Regards
 Andrey Hristov
 IcyGEN Corporation
 http://www.icygen.com
 BALANCED SOLUTIONS


 - Original Message -
 From: PHP Newbie [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, November 23, 2001 11:00 AM
 Subject: [PHP] read file

  hi,
  i have a file with ips inside
 
  192.168.1.1
  192.168.1.2
  ...
 
  now i must write that in a html table with php.
  i think that is easy, but i'm a newbie and don't find anything how to do
  it.
 
  please help me
 
  thx
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] file upload troubles

2001-11-23 Thread fitiux

Hi  :-)
could you post your code?

regards,
--Patricio

- Original Message -
From: Nikola Veber [EMAIL PROTECTED]
To: php forum [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 10:01 PM
Subject: [PHP] file upload troubles
 Hi !
 I'm having terrible troubles with the file upload program I need. I have
read a couple of tutorials and studied the examples
 in the manual, but it won't work. Every tutorial I read worked with
variables $usrefile, $userfile_name etc. When I copy
 the same example code , I get the error msg. that $usefile_name is unkown.
I'd also like to know what does
 enctype=\multipart/form-data\
 mean and what is its function.
 Thanks
 Nikola



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session

2001-11-23 Thread Oosten, Sjoerd van

Hi, is it possible to make a session last longer?

Thanks,


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 23 Nov 2001 14:10:17 -0000 Issue 1011

2001-11-23 Thread php-general-digest-help


php-general Digest 23 Nov 2001 14:10:17 - Issue 1011

Topics (messages 75546 through 75577):

Missing PHP.ini
75546 by: John Monfort
75547 by: Joseph Blythe
75548 by: Martin Towell
75549 by: John Monfort
75551 by: David Robley

Re: error handling and __LINE__
75550 by: Papp Gyozo

Re: SQL in Function
75552 by: David Robley

strip php out of html
75553 by: Joseph Blythe
75554 by: David Robley
7 by: Michael Sims
75556 by: Joseph Blythe
75558 by: Joseph Blythe

Object Persistence like Resource Persistence already implemented?
75557 by: Yermo M. Lamers

MySQL query problem!
75559 by: De Necker Henri
75561 by: David Robley
75562 by: De Necker Henri
75564 by: David Robley

Re: GD, PNG
75560 by: Yamin Prabudy
75563 by: Joseph Blythe

read file
75565 by: PHP Newbie
75566 by: Andrey  Hristov

HTTP_REFERER
75567 by: Jordan Elver
75568 by: gaouzief
75569 by: Sebastian Wenleder
75570 by: Matt Williams
75572 by: Jordan Elver
75573 by: Matt Williams
75577 by: Jordan Elver

file upload troubles
75571 by: Nikola Veber
75574 by: fitiux

php-html
75575 by: Christoph Starkmann

upload problems
75576 by: Nikola Veber

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---



 Hello everyone!

 I upgraded my system from win98 to win2k, a few weeks ago.
 Now,  I can't seem to locate my php.ini file.

 I've looked in
  C:\
  C:\windows
  C:\windows\system (and system32)

  to no success.

 Is anyone aware of what may have happened?
 I was under the impression that PHP could NOT run without the Php.ini
 file, is that incorrect?

 Please help.

 -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-



---End Message---
---BeginMessage---

John,

Look in the original distribution files for php.ini-dist (or
php.ini-optimized) and copy it to c:\windows\php.ini

As far as I know php can run without a php.ini I beleive it has builtin
defaults.

Regards,

Joseph

-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 November 2001 12:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Missing PHP.ini




 Hello everyone!

 I upgraded my system from win98 to win2k, a few weeks ago.
 Now,  I can't seem to locate my php.ini file.

 I've looked in
  C:\
  C:\windows
  C:\windows\system (and system32)

  to no success.

 Is anyone aware of what may have happened?
 I was under the impression that PHP could NOT run without the Php.ini
 file, is that incorrect?

 Please help.

 -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


---End Message---
---BeginMessage---

doesn't win2k files go under C:\winnt ?
what about looking under the php directory???

-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 23, 2001 1:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Missing PHP.ini




 Hello everyone!

 I upgraded my system from win98 to win2k, a few weeks ago.
 Now,  I can't seem to locate my php.ini file.

 I've looked in
  C:\
  C:\windows
  C:\windows\system (and system32)

  to no success.

 Is anyone aware of what may have happened?
 I was under the impression that PHP could NOT run without the Php.ini
 file, is that incorrect?

 Please help.

 -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---End Message---
---BeginMessage---



 Thanks Joseph!

 btw,

 Happy Thanksgiving to all!


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Fri, 23 Nov 2001, Joseph Blythe wrote:

 John,

 Look in the original 

[PHP] upload problems

2001-11-23 Thread Nikola Veber

Hi !

You asked for the code ...
Here you go :

html
body

form action=?global $PHP_SELF; echo $PHP_SELF? method=POST 
ENCTYPE=multipart/form-data
  table
tr
  tdSelect File:/td
  td:/td
  tdinput type=file name=userfile/td
/tr
tr
  tdnbsp;/td
  tdnbsp;/td
  tdinput type=submit value=Upload/td
/tr
/table
  /form
?php
//the code is not finished due to those problems ...
//when I proceed with the submit button, I get white screen (nothing at all)!
print_r ($HTTP_POST_VARS);
global $userfile;
global $userfile_name;
$dir = \upload;
$temp = \temp;
$twhere = $temp . / . $userfile_name;
$where = $dir . / . $userfile_name;
rename($userfile, $temp/$userfile_name);
copy(twhere, $where);
unlink($twhere);
echo OK: File \$userfile_name\ uploaded succesfully;
?
/body
/html


Thanks
Nikola



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ereg

2001-11-23 Thread Christoph Starkmann

As far as I can say, a simple ereg-command is always greedy, isn't it?
Can you tell me how to switch greedy off?

I want to find everything between the start- and end-php-tags:

$phpIncludes = array();
ereg(\?php.*\?\, $html, $phpIncludes);

where $html contains the entire page, containing one php-script-section
at the very top and one at the very botton, and maybe some inbetween.

Now the above ereg always returns me the entire site in $phpIncludes[0];

All help is appreciated, thanx a lot,

cheers,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php-html

2001-11-23 Thread Christoph Starkmann

Hi there!

I had to create a large number of HTML-files with large parts
within that are identical (the navigation).
To avoid redundant writing during the creation of the files,
I used PHP-Includes to include this navigation from one file.

Now I have to get static HTML-pages from these php-enriched files.

I am thinking about using regexp to filter the php-tags and include
the corresponding HTML-Sniplets.

Or I guess I could open a connection to the server and read these
files as if I was a client (browser) and stzore the resulting HTML-pages.

Any idea what would be easier (I got very few time...)

Any hints?

Cheers, 

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_REFERER

2001-11-23 Thread Jordan Elver

Hi,
When I use HTTP_REFERER it gives me the name of the php script which is 
handling the 404's?!

Should that happen?

Jord

On Friday 23 November 2001 11:41, you wrote:
  Hi,
  I'm writing a 404 handler and in order to report the item that
  was requested
  I was trying to get the value of HTTP_REFERER. But, it does seem
  to get set.
  Does anyone know how to find thi value? Is there a reason why it
  would not
  get set?

 Hi

 I think you're looking for this

 $HTTP_SERVER_VARS[REQUEST_URI]

 M:

-- 
Jordan Elver
Web Developer
http://www.theinternetone.co.uk
testing? What's that? If it compiles, it is good, if it boots up it is 
perfect. --- Linus Torvalds

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] file upload troubles

2001-11-23 Thread Nikola Veber

Hi !

I'm having terrible troubles with the file upload program I need. I have read a couple 
of tutorials and studied the examples 
in the manual, but it won't work. Every tutorial I read worked with variables 
$usrefile, $userfile_name etc. When I copy 
the same example code , I get the error msg. that $usefile_name is unkown. I'd also 
like to know what does 
enctype=\multipart/form-data\
mean and what is its function. 

Thanks

Nikola 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] HTTP_REFERER

2001-11-23 Thread Matt Williams

 Hi,
 When I use HTTP_REFERER it gives me the name of the php script which is
 handling the 404's?!

 Should that happen?

As someone put in one of the other reply's don't rely on HTTP_REFERER.
This is set (or not) by the browser and they all have different ideas about
they want to play ball with it.

You said you wanted to find the url they were trying to get at.
Use the variable I told you about before to get his

Regards
M:


 Jord

 On Friday 23 November 2001 11:41, you wrote:
   Hi,
   I'm writing a 404 handler and in order to report the item that
   was requested
   I was trying to get the value of HTTP_REFERER. But, it does seem
   to get set.
   Does anyone know how to find thi value? Is there a reason why it
   would not
   get set?
 
  Hi
 
  I think you're looking for this
 
  $HTTP_SERVER_VARS[REQUEST_URI]
 
  M:

 --
 Jordan Elver
 Web Developer
 http://www.theinternetone.co.uk
 testing? What's that? If it compiles, it is good, if it boots up it is
 perfect. --- Linus Torvalds



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] are JSP better than PHP ?

2001-11-23 Thread Alawi

JSP or PHP what the best ? 
and what are in JSP are not in PHP ? 
and what are in PHP  are not in JSP ? 

can any body tell me ?



[PHP] Re: read file

2001-11-23 Thread Jaime Iniesta Aleman

Is it so easy to open a file and include it in a page? I do it this way:

*
$file_name = filename.txt;
if(file_exists($file_name))
{
 $file_pointer = fopen($file_name, r);
 $file_read = fread($file_pointer, filesize($file_name));
 fclose($file_pointer);
 print $file_read;
}
**

Jaime Iniesta Alemán   -   IT Specialist
   IBM Global Services
   Tel. 34-91-3977450   -   e-mail:   [EMAIL PROTECTED]
**

$content = file('file_name.txt');
$HTML .='table';
foreach ($content as $v){
$HTML .='trtd'.$v.'/td/tr';
}
$HTML .='/table';
echo $HTML;




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP_REFERER

2001-11-23 Thread Jim Lucas

at our site, we built the error trapping that you are wanting to build.

here is a snippet of what we used.

  PSID: (. PSID .)\n.
  Page: ($GLOBALS[REQUEST_URI])\n.
  As refered from: ($GLOBALS[HTTP_REFERER])\n.
  Browser Platform: ($GLOBALS[HTTP_USER_AGENT])\n.
  User IP: '. gethostbyaddr($GLOBALS[REMOTE_ADDR]) .'
($GLOBALS[REMOTE_ADDR])\n.

hope this helps

Jim
- Original Message -
From: Jordan Elver [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Friday, November 23, 2001 2:55 AM
Subject: [PHP] HTTP_REFERER


 Hi,
 I'm writing a 404 handler and in order to report the item that was
requested
 I was trying to get the value of HTTP_REFERER. But, it does seem to get
set.
 Does anyone know how to find thi value? Is there a reason why it would not
 get set?

 TIA,

 Jord
 --
 Jordan Elver
 Web Developer
 http://www.theinternetone.co.uk
 Carpe Aptenodytes! (Seize the Penguins!)

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Displaying content on the fly

2001-11-23 Thread Darren Gamble

Good day,

I've been using both Perl and PHP for some time now for dynamic content.
I'm presently running PHP4 as an apache module.

One difference that I've noticed is that PHP doesn't produce any output
until the script is complete, whereas with Perl one could print doing
this...  , perform something, done. messages when performing long tasks.

Is there any way to have this enabled?  It would be quite appreciated, as I
have a few web pages that perform very heavy database work and I would like
to make the output hot so that I can print out statements as it
progresses- and if there is a problem, the user will be able to identify
where it failed.

There doesn't appear to be a php.ini directive that does this, though...

Thanks in advance,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Displaying content on the fly

2001-11-23 Thread Richard Black

Try using the flush(); function. It flushes all output to the browser, and allows 
exactly the type of thing you're talking about here

-Original Message-
From:   Darren Gamble [SMTP:[EMAIL PROTECTED]]
Sent:   23 November 2001 16:17
To: '[EMAIL PROTECTED]'
Subject:[PHP] Displaying content on the fly

Good day,

I've been using both Perl and PHP for some time now for dynamic content.
I'm presently running PHP4 as an apache module.

One difference that I've noticed is that PHP doesn't produce any output
until the script is complete, whereas with Perl one could print doing
this...  , perform something, done. messages when performing long tasks.

Is there any way to have this enabled?  It would be quite appreciated, as I
have a few web pages that perform very heavy database work and I would like
to make the output hot so that I can print out statements as it
progresses- and if there is a problem, the user will be able to identify
where it failed.

There doesn't appear to be a php.ini directive that does this, though...

Thanks in advance,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Displaying content on the fly

2001-11-23 Thread Darren Gamble

Good day,

Thanks for the reply!  I was not quite sure how this would be phrased
(searching for on the fly on the page causes an error to be returned).


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Richard Black [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 23, 2001 9:31 AM
To: 'Darren Gamble'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Displaying content on the fly


Try using the flush(); function. It flushes all output to the browser, and
allows exactly the type of thing you're talking about here

-Original Message-
From:   Darren Gamble [SMTP:[EMAIL PROTECTED]]
Sent:   23 November 2001 16:17
To: '[EMAIL PROTECTED]'
Subject:[PHP] Displaying content on the fly

Good day,

I've been using both Perl and PHP for some time now for dynamic content.
I'm presently running PHP4 as an apache module.

One difference that I've noticed is that PHP doesn't produce any output
until the script is complete, whereas with Perl one could print doing
this...  , perform something, done. messages when performing long tasks.

Is there any way to have this enabled?  It would be quite appreciated, as I
have a few web pages that perform very heavy database work and I would like
to make the output hot so that I can print out statements as it
progresses- and if there is a problem, the user will be able to identify
where it failed.

There doesn't appear to be a php.ini directive that does this, though...

Thanks in advance,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] argv

2001-11-23 Thread PACKER, Steffan

the $argv is meant to contain all the arguments sent to the script. I need
to get access to these but when I try to access them I can't!
if I just use echo($argv) the only output is 'Array'

All I am expecting to find for the purpose of my script is a five letter
code, not a name/value pair.

Can anyone help?

Thanks,
Steffan



DISCLAIMER

Any opinions expressed in this email are those of the individual
and not necessarily the company.  This email and any files 
transmitted with it, including replies and forwarded copies (which
may contain alterations) subsequently transmitted from the 
Company, are confidential and solely for the use of the intended
recipient.  It may contain material protected by attorney-client
privilege.  If you are not the intended recipient or the person
responsible for delivering to the intended recipient, be advised
that you have received this email in error and that any use is
strictly prohibited.

If you have received this email in error please notify the Network
Manager by telephone on +44 (0) 870 243 2431.

Please then delete this email and destroy any copies of it.
This email has been swept for viruses before leaving our system.

Admiral Insurance Services Limited, Cardiff CF10 3AZ



_
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp



Re: [PHP] mailing list script?

2001-11-23 Thread Yura

Hi, 

Thank you all for help, I figured out that fsockopen() is the same as telnet so I 
found command 
for telnet and now successfully apply them through fputs() Now all I have to do is to 
come back 
to beginnings and figure out how to separate message header and text and then 
temporary store 
it and then put it into database for future use.

Thank you,

Youri

 You can pipe mail sent to certain email addresses directly to
 programs, or PHP shell scripts.
 
 Of course, you will need to have access to the mail server's config
 files, or get your hosting provider to set that up for you.
 
 That script can then take the email, parse it, and shove it into a DB.
 
 Mike
 
 Yura wrote:
 
 Hi, 
 
 I already run php site www.body-builders.org but I wanned to add to
 it mailing list like this one at php.net I understand general
 algorithm of it but as newbuy I don't know how MySQL database can
 receive mail and then add it to the base? 
 
 so my question is how do i make MySQL database to receive emails
 automaticaly? 
 
 Youri 
 
 God is our provider 
 http://www.body-builders.org
 
 
 
 
 

God is our provider 
http://www.body-builders.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] argv

2001-11-23 Thread Andrey Hristov

var_dump($argv);

$argv is an array. Don't expect if you coded in C that this is pointer to the first so 
you possibly want to do echo of the first in
the array.
instead do :
foreach($argv as $param_name = $param_value){
// do your stuff here
}

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message -
From: PACKER, Steffan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 23, 2001 7:02 PM
Subject: [PHP] argv


 the $argv is meant to contain all the arguments sent to the script. I need
 to get access to these but when I try to access them I can't!
 if I just use echo($argv) the only output is 'Array'

 All I am expecting to find for the purpose of my script is a five letter
 code, not a name/value pair.

 Can anyone help?

 Thanks,
 Steffan


 
 DISCLAIMER

 Any opinions expressed in this email are those of the individual
 and not necessarily the company.  This email and any files
 transmitted with it, including replies and forwarded copies (which
 may contain alterations) subsequently transmitted from the
 Company, are confidential and solely for the use of the intended
 recipient.  It may contain material protected by attorney-client
 privilege.  If you are not the intended recipient or the person
 responsible for delivering to the intended recipient, be advised
 that you have received this email in error and that any use is
 strictly prohibited.

 If you have received this email in error please notify the Network
 Manager by telephone on +44 (0) 870 243 2431.

 Please then delete this email and destroy any copies of it.
 This email has been swept for viruses before leaving our system.

 Admiral Insurance Services Limited, Cardiff CF10 3AZ
 


 _
 This message has been checked for all known viruses by the
 MessageLabs Virus Scanning Service. For further information visit
 http://www.messagelabs.com/stats.asp



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP and UDP socket

2001-11-23 Thread Blaster

Hi,

I have a problem with UDP sockets in PHP. What I want to do is the 
following, i send a UDP message
to a server, and a reply should come instantly back. Now, the length of the 
message returned to me
is unknown. It can be anywhere from 1 to 8192 (or more) bytes. However, 
some strange problems
arise when i try to do this.

I first open a udp socket to my server. The socket handle is valid, and I 
send off my message.
(my socket is now in blockingmode, opened by fsockopen).

A message is returned to me and I receive one byte at the time in a loop. 
The receive procedure I
use is fgetc. It states in the manual that this function retrieves 1 
byte, if the file pointer is at the
end of the stream, it should return false.

This is my code so far:
$query_handle = fsockopen(udp://$host, $port, $errno, $errstr, $timeout);
$request = mymsg;
$databuffer = ;

if ($query_handle) {
  fwrite($query_handle, $request);
  $do = true;

   while ($do) {
$tempdata = fgetc($query_handle);
if (!$tempdata) {
 $do = false;
} else {
 $databuffer .= $tempdata;
}
   }

  echo(Received  . strlen($databuffer) .  bytes of data.);
  fclose($query_handle);
} else {
  echo Invalid socket handle - $errstr.\n;
}

Now, the fgetc doesn't seem to return false. Ever? Instead it sits there 
and waits for another byte, but since
there is no more data, my script sits here until the script times out (30 
sec).



In short,
How can I get the number of bytes waiting for me in the socket buffer (so I 
can use fread to get all in one)
OR
How can I set a timeout for fgetc? For example, it should wait for a char 
for x seconds.



Please help. I'm getting extremly frustrated about this now!

I've tried fread($mysockhandle, 8192) to receive all data but it doesn't 
work either. It seems like
fread also waits until 8192 bytes is in the buffer, THEN returns. But since 
i cannot assume the
message is a constant size, this is no good for me.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Presentazione Bicicletta Telematica

2001-11-23 Thread redazione


Spettabile [intestazione]
===
Il 13 novembre è stata ufficialmente presentata a Padova la
BICICLETTA TELEMATICA  un side-car equipaggiato con 
un computer collegato ad internet con trazione assistita 
elettricamente. Questo curioso veicolo percorrerà il 
QUARTIERE SAVONAROLA di Padova per promuovere la 
PIAZZA TELEMATICA del quartiere.

Giovani partecipanti al progetto diventeranno 
cronisti di quartiere e la useranno per avvicinare 
gli abitanti e guidarli su internet fino al sito web 
http://www.el-quartieresavonarola.it
dove troveranno  informazioni utili, curiosità e storie
sulla vita del Quartiere. La bicicletta sarà dunque il mezzo 
per avvicinare il Savonarola a internet e traghettare 
nella Rete la viva voce dei suoi abitanti.

Per dare un nome alla bicicletta telematica è stato indetto un 
CONCORSO aperto a tutti i visitatori del sito.
---
L'originale iniziativa di ISTITUZIONE PROGETTO IMPRESA
rientra nel CONTRATTO DI QUARTIERE SAVONAROLA, 
finanziato dal Comune di Padova e dal Ministero dei 
Lavori Pubblici per promuovere la riqualificazione urbanistica 
di uno dei quartieri degradati della città.

La PIAZZA TELEMATICA  mira a stimolare la partecipazione di 
tutte le componenti sociali ed associative alla 
riqualificazione del territorio, con l'obiettivo di 
- incoraggiare il senso di appartenenza degli abitanti 
- migliorare le loro relazioni sociali
- promuovere l'alfabetizzazione informatica
- favorire l'occupazione
- promuovere il telelavoro.
---
La Piazza Telematica é all'indirizzo
http://www.el-quartieresavonarola.it

La Redazione della Piazza Telematica é all'indirizzo
[EMAIL PROTECTED]

La Bicicletta Telematica é stata progettata e realizzata da 
DNA s.r.l di Vicenza
http://www.dnasrl.it
===




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]