Reply to Re: Running a PHP script with get params in shell

Your name:

Reply:


Posted by infolock on 06/20/06 15:07

An alternative method would be to just pass the arguments to the script
from the shell

Example :

php foo.php -offset 0 -rows 8000 language en


in your foo.php script, just print_r on $_SERVER['argv']

you should see an array format like :

array (
-offset,
0,
-rows,
8000,
language,
en
)



Nick Weisser wrote:
> Nick Weisser wrote:
> > Any ideas how to handle with these get params in order to achieve the
> > desired result would be very much appreciated :-)
>
> It works like so:
>
> curl -q "http://www.mydomain.com/foo.php?offset=0&rows=8000&language=en"
>
> Other suggestions are nevertheless welcome.
>
> Cheers,
> Nick

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация