<to**@tony.co m> wrote in message
news:MP******** *************** *@news-text.blueyonder .co.uk...
Is it possible to use the post method to send a form from PHP without
having to put the form in a html page?
Unless I've failed to understand what you're after, you could use the CURL
library.
It allows you to call any web page (not necessarily a PHP page) from within
your PHP.
Make sure the "extension=php_ curl.dll" is uncommented in your PHP.ini.
Something like this (which uses buffering to stop the returned web page
being displayed)...
ob_start();
$ch = curl_init('http s://www.mysite.com/cgi/incoming.php');
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIE LDS, 'data01=12&data 02=rejected');
curl_exec($ch);
$getinfo_result s = curl_getinfo($c h);
curl_close( $ch );
$return_page = ob_get_contents ();
ob_end_clean();
"$getinfo_resul ts" will give an array of information telling you if the page
request was successful or not, and "$return_pa ge" will contain the full HTML
of the request.
Tom