Re: [PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 14:53, Phil Powell wrote: TCL 1, PHP 0 Ok, I am frustrated.. here is my code and this portion has to be done in PHP. I have a frame that can only be accessed if 1 of 2 things occur: 1) if $HTTP_REFERER has a specific value 2) if your nickname passed in the query

[PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Phil Powell
TCL 1, PHP 0 Ok, I am frustrated.. here is my code and this portion has to be done in PHP. I have a frame that can only be accessed if 1 of 2 things occur: 1) if $HTTP_REFERER has a specific value 2) if your nickname passed in the query string is found in the existing nicknames.txt file found

Re: [PHP] PHP can't access txt files (but TCL can..??)

2002-05-11 Thread Phil Powell
Swell, I found the error, and it was a STUPID one.. I misconfigured fread()! Thanx though Phil TCL 1, PHP 2 - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Phil Powell [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, May 11, 2002 6:13 PM Subject: Re: [PHP]

[PHP] read all files in directory

2002-05-11 Thread Andreas Indahl
Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Andreas Indahl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read all files in directory

2002-05-11 Thread Rasmus Lerdorf
See http://php.net/readdir for a full example. On Sun, 12 May 2002, Andreas Indahl wrote: Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Andreas Indahl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] read all files in directory

2002-05-11 Thread Stuart Dallas
On Sun, 12 May 2002 00:39:21 +0200, you wrote: How can I read all files in a directory, when I don't know which files are there? http://www.php.net/manual/en/class.dir.php -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best way for date/time

2002-05-11 Thread olinux
Have a look at ADDDATE() and SUBDATE() mysql SELECT DATE_ADD(1997-12-31 23:59:59, - INTERVAL 1 DAY); - 1998-01-01 23:59:59 DATE_FORMAT(date,format) will also be very helpful to use in your queries, allowing you to return your mysql date in a human friendly format of

Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:39, Andreas Indahl wrote: Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely Andreas Indahl Try some of the examples from the manual: http://www.php.net/manual/en/function.opendir.php

Re: [PHP] read all files in directory

2002-05-11 Thread olinux
$dirPath = C:\somepath; $dhandle = opendir($dirPath); while ($filename = readdir($dhandle)) { echo $filename . br; }// end read filenames --- Andreas Indahl [EMAIL PROTECTED] wrote: Hi! How can I read all files in a directory, when I don't know which files are there? Sincerely

RE: [PHP] MySQL and RH 7.2

2002-05-11 Thread David Freeman
I tried locate and find and both come up empty for mysqladmin. Am I missing something stupid here? How did you install it? Did you build from source or use rpm's? If you installed from rpm's which ones did you install? From memory there's about four rpm's that you'll need to have

Re: [PHP] read all files in directory

2002-05-11 Thread Lars Torben Wilson
On Sat, 2002-05-11 at 15:52, olinux wrote: $dirPath = C:\somepath; $dhandle = opendir($dirPath); while ($filename = readdir($dhandle)) { This will bail on the first directory entry which has a name which evaluates to false. Try it after 'touch 0' in the directory you're scanningthe

[PHP] Send html email

2002-05-11 Thread Alex Shi
Hi! How can I send a html email with just the build-in function mail()? Is this required to put some infomation in header field? Thanks in advance! Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Send html email

2002-05-11 Thread Nookie
On Sunday 12 May 2002 02:00, Alex Shi wrote: Hi! How can I send a html email with just the build-in function mail()? Is this required to put some infomation in header field? Thanks in advance! Alex mail([EMAIL PROTECTED],$subject,$content,Content-type: text/html); Greeitngs, Szymon Kosok

Re: [PHP] Send html email

2002-05-11 Thread Liam MacKenzie
RTFM http://www.php.net/manual/en/function.mail.php - Original Message - From: Alex Shi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, May 12, 2002 10:00 AM Subject: [PHP] Send html email Hi! How can I send a html email with just the build-in function mail()? Is this

Re: [PHP] Send html email

2002-05-11 Thread Michael Geier
While I understand the necessity in not answering every question that a newbie may post, a more pleasant approach would have been: the following is documented at http://www.php.net/manual/en/function.mail.php; or see the Content-Type: header for instructions on how to do this. Do you think

[PHP] preg_grep Help (Regular expresion)

2002-05-11 Thread Brian C. Doyle
Hello all, I have a file that has ip address in it.. I need to pull those ip addresses out. Currently I am trying: $ips=preg_grep(/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/,$file); print_r(array_values ($ips)); And well i am getting nothing! Anyone? -- PHP General Mailing List

Re: [PHP] Send html email

2002-05-11 Thread Alex Shi
Thanks for all of you who answered my question. But another of my stupid question is: what is RTFM? Alex Michael Geier [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... While I understand the necessity in not answering every question that a newbie may post, a

[PHP] Authentication with register_globals OFF

2002-05-11 Thread Mike P
OK, this is an authentication with PHP newbie question... Env: WinNT 4.0, SP6a PHP 4.2.0 Apache 2.0.36 MySQL 4.0.1 Development/sandbox Trying to get accustomed to PHP 4.2.0 and PHP's preference for register_globals off, I have register_globals off. However, when I try to use $PHP_AUTH_USER and

[PHP] Printing line x in a file

2002-05-11 Thread Andrew Conner
I have a script where I need to get the text from line number $line in file $filename then save it to a var ($text) and then print it. For example, in the file lamb.txt (just an example file): Mary was a little lamb, whose fleece was as white as snow. I need to get line number 3 (fleece) and

Re: [PHP] Authentication with register_globals OFF

2002-05-11 Thread Stuart Dallas
On Sat, 11 May 2002 21:21:27 -0400, you wrote: Trying to get accustomed to PHP 4.2.0 and PHP's preference for register_globals off, I have register_globals off. However, when I try to use $PHP_AUTH_USER and $PHP_AUTH_PW, my script fails (attempting to validate username and password credectials

Re: [PHP] Authentication with register_globals OFF

2002-05-11 Thread Mike
Thanks, Stuart. I'll admit I don't fully I understand register_globals. Beyond that, I am sure I am not clear on the value of NOT using register_globals. I am wading through the docs constantly. Haven't quite finished. Regardless, thanks for the assist. Mike - Original Message -

[PHP] Serialize/URLencode query...

2002-05-11 Thread Glenn Sieb
I'd like to pass a bunch of variables to another PHP page for processing there... I think serialize() and urlencode() will do what I'm looking for.. can I pass multiple strings through this? I'm also not clear on how I can decode the separate strings out... Can someone point me in the right

[PHP] Yahoo/Cobalt servers/PHP

2002-05-11 Thread Todd Cary
One of my clients signed up for service at Yahoo for space on a Cobalt server. The specs say that it has Php and Interbase. I go to the server and do a phpinfo() and find out that Interbase is not compiled into PHP but MySQL is. Then I find out that MySQL is *not* installed on the server. Am I

RE: [PHP] Serialize/URLencode query...

2002-05-11 Thread John Holmes
You should use sessions. All you have to do is call session_start() at the beginning of your code. Then, any variable you want to save to the session, you simply use: $_SESSION[name] = $name; Then, on the next page, call session_start() again, and you'll have the value of $name from the

RE: [PHP] Yahoo/Cobalt servers/PHP

2002-05-11 Thread John Holmes
Am I missing something here? If one wants to have dynamic pages and uses PHP, then *some* DB has to be available, correct? Ideally, yes, you'd want a database. But you could do it with text files... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: Yahoo/Cobalt servers/PHP

2002-05-11 Thread Austin Marshall
Todd Cary wrote: One of my clients signed up for service at Yahoo for space on a Cobalt server. The specs say that it has Php and Interbase. I go to the server and do a phpinfo() and find out that Interbase is not compiled into PHP but MySQL is. Then I find out that MySQL is *not* installed

RE: [PHP] Serialize/URLencode query...

2002-05-11 Thread Glenn Sieb
At 12:11 AM 5/12/2002 -0700, John Holmes posted the following... You should use sessions. All you have to do is call session_start() at the beginning of your code. Then, any variable you want to save to the session, you simply use: That did the trick! Thanks for the explanation, John! Now I have

Re: [PHP] setcookie()

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, jtjohnston wrote: This is a bug Feature/Change Request I made to: http://bugs.php.net/bug.php?id=17158 setcookie() states cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). I argue this is a restriction of PHP, not

Re: [PHP] Send html email

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Alex Shi wrote: Thanks for all of you who answered my question. But another of my stupid question is: what is RTFM? RTFM == Read The Flurking Manual miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Printing line x in a file

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Andrew Conner wrote: I have a script where I need to get the text from line number $line in file $filename then save it to a var ($text) and then print it. For example, in the file lamb.txt (just an example file): Mary was a little lamb, whose fleece was as white as

[PHP] [FYI] DNS resolver library

2002-05-11 Thread Moriyoshi Koizumi
Hello, I wrote a DNS resolver library in pure PHP script. The library can be run both on windows and on *nix variants. (I have not tested on BeOS) The package contains a wrapper library that provides almost the same functionality of getmxrr() and checkdnsrr(), so if you would like to run PHP

<    1   2