note 15584 deleted from function.require by sniper
| From: | sniper@php.net | Date: | Sat, 18 Jan 2003 15:29:46 +0000 |
| Subject: | note 15584 deleted from function.require by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42354@lists.php.net to get a copy of this message | ||
A working require or include that passes POST variables to a remote form.
(VERY IMPORTANT)
<?php
// First capture all the post variables and pass them on through the
// kludgey "GET-like" mechanism of PHP
while(list($key2,$val2) = each($HTTP_POST_VARS)) {
$val = urlencode($val2);
$tmp .= $key2. "=" . $val . "&";
}
// Remove that last "&"
$VARS= substr($tmp,0,strlen($tmp)-1);
$DOCROOT="http://yourserver/";
$REMOTE = $DOCROOT."/remote.php?". $VARS;
require ($REMOTE);
?>