[PHP] forms and IP numbers
A friend of mine found a bug in my messageboard code, this way he can post with other (than in my database) nicknames from a local form. Now I want to have the formhandler do a check from where the form is sent. If it is not sent from my own webserver it has to display an error message. Thanks, Marc van Duivenvoorde -- 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] need help on system()
I would do it this way . ? $quota = `/usr/bin/sudo /usr/bin/quota -v test`; // please mind that the command is between backtics and not quotes echo $quota; // It probably doesn't produce a nice looking output but you can change that yourself // This doesn't work when you have safe mode on in your php.ini file, because then // it doesn't allow commands to be run within backtics. ? Marc van Duivenvoorde At 04:21 PM 7/11/2001 +0800, you wrote: I run the php script as following: ?php //test.php system(/usr/bin/sudo /usr/bin/quota -v test) ? php test.php - I can get the output in the browser: http://localhost/test.php - I cannot see any output However, ?php system(finger); ? I can both get the output in the console and browser. Does anybody know the reasons? Thank you very much! -- 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] need help on system()
hhhm, I played around a little and found another solution which you might find usefull ? exec(/bin/ls -al /home/marcd,$ls); Array($ls); $max = sizeof($ls); $num = 0; while ($num = $max) { echo $quota[$num],br\n; $num++; } ? This way you can execute any command and put the output to an array, in the while loop you can print any line in the array. Marc van Duivenvoorde At 01:38 PM 7/11/2001 +0200, Marc van Duivenvoorde wrote: I would do it this way . ? $quota = `/usr/bin/sudo /usr/bin/quota -v test`; // please mind that the command is between backtics and not quotes echo $quota; // It probably doesn't produce a nice looking output but you can change that yourself // This doesn't work when you have safe mode on in your php.ini file, because then // it doesn't allow commands to be run within backtics. ? Marc van Duivenvoorde At 04:21 PM 7/11/2001 +0800, you wrote: I run the php script as following: ?php //test.php system(/usr/bin/sudo /usr/bin/quota -v test) ? php test.php - I can get the output in the browser: http://localhost/test.php - I cannot see any output However, ?php system(finger); ? I can both get the output in the console and browser. Does anybody know the reasons? Thank you very much! -- 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 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] Number of the line ?
You could also use phpcoder, if you're working with M$ windows. http://www.phpide.de It is freeware and currently still in development, but it's working quite fine. I use it when programming php in windows, under linux I still use Gvim. Marc van Duivenvoorde At 06:37 PM 7/6/2001 +1000, ReDucTor wrote: get editplus at editplus.com great program, has syntax highlighting, numbers, auto complete, everything - James ReDucTor Mitchell - Original Message - From: Emmanuel FAIVRE [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 6:19 PM Subject: [PHP] Number of the line ? Hi All, i'm currently writing a debugging lib in PHP and i would like to find the number of the line in my script when i made an myfile.php 1 ?php 2 echo i'm on line $NUMBER_LINE\n; 3 echo i'm on line $NUMBER_LINE\n; 4 ? would give : i'm on line 2 i'm on line 3 it perhaps exists because when we have warning we see the line number Thanks Manu -- 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 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] get a screen resolution
I'm trying to make a small browser and screen resolution script for my site, the browser part isn't a problem, but I can't find a function for screen resolutions, does anyone know whether such a function exists. Thanks, Marc van Duivenvoorde -- 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] get a screen resolution
I know I can do it with javascript, but if possible I'd like to do it with php. Marc van Duivenvoorde At 02:12 PM 7/6/2001 +0300, you wrote: JavaScript -Original Message- From: Marc van Duivenvoorde [mailto:[EMAIL PROTECTED]] Sent: 6 iulie 2001 14:18 To: Php general lijst Subject: [PHP] get a screen resolution I'm trying to make a small browser and screen resolution script for my site, the browser part isn't a problem, but I can't find a function for screen resolutions, does anyone know whether such a function exists. Thanks, Marc van Duivenvoorde -- 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] php binary ??
I've got a small question, can I make php system scripts just like perl when I have compiled php as a dso module for apache or do I have to compile it to an binary executable ?? something like #! /usr/bin/perl -w with a script except then for php. Marc van Duivenvoorde -- 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]