Forum Moderators: coopster

Message Too Old, No Replies

Php Post Script no Form

         

PSWorx

7:20 am on Dec 9, 2005 (gmt 0)

10+ Year Member



How to generate the headers to submit POSTED variables to a page? i know this will be brief, just need to know how to construct the headers with the posted var

TIA

coopster

2:18 pm on Dec 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Something like this?
$headers = "POST /path/to/myprocessingform.php HTTP/1.1\r\n"; 
$headers .= "Host: www.example.com\r\n";
$headers .= "Content-Type: application/x-www-form-urlencoded\r\n";
$headers .= "Content-Length: " . strlen("variable1=$value1&var2=val2") . "\r\n";
$headers .= "Connection: close\r\n\r\n";
$headers .= "variable1=$value1&var2=val2";

PSWorx

3:26 pm on Dec 9, 2005 (gmt 0)

10+ Year Member



Always a good source of knowledge, much appreciated coop, the info on the net tends to cloud what i actually need

Thanks again