note 64472 added to function.parse-str

From: Date: Sat, 15 Apr 2006 01:13:13 +0000
Subject: note 64472 added to function.parse-str
Groups: php.notes 
Request: Send a blank email to php-notes+get-108126@lists.php.net to get a copy of this message
When you have scripts run through the command-line (like locally via cron), you might want to be able to use _GET and _POST vars. Put this in top of your scheduled task files: <? parse_str ($_SERVER['argv'][1], $GLOBALS['_GET']); parse_str ($_SERVER['argv'][2], $GLOBALS['_POST']); ?> And call your script by: /usr/local/bin/php /path/to/script.php "id=45&action=delete" "formsubmitted=true" Cheers! ---- Server IP: 193.27.201.10 (proxied: 193.27.201.10 1.0 www1.shellkonto.se:3128 (squid/2.5.STABLE4)) Probable Submitter: 81.225.139.6 ---- X-Spam-Status: No, hits=3.8 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, UPPERCASE_25_50 autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.parse-str.php Edit -- http://master.php.net/note/edit/64472 Del: integrated -- http://master.php.net/note/delete/64472/integrated Del: useless -- http://master.php.net/note/delete/64472/useless Del: bad code -- http://master.php.net/note/delete/64472/bad+code Del: spam -- http://master.php.net/note/delete/64472/spam Del: non-english -- http://master.php.net/note/delete/64472/non-english Del: in docs -- http://master.php.net/note/delete/64472/in+docs Del: other reasons-- http://master.php.net/note/delete/64472 Reject -- http://master.php.net/note/reject/64472 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#108126) next »