Greetings, 

first of all you'll need to have all of your variables in one line:
like this for example
$vars="var1=".urlencode($var1)."&var2=".urlencode($var2);

then you need to post the following 
$header="POST /your_script.php HTTP/1.0\r\nContent-length:
".strlen($vars)\r\n\r\n$vars\r\n\r\n";

echo $header

Of course these are not the complete headers browser sends,

HTH,
-- 
Vahan Yerkanian                       Email: [EMAIL PROTECTED]
Leading Web Developer / Designer      Phone: (374) 158-2723
Web Development Department            Fax:   (374) 128-5082
ARMINCO Global Telecommunications     http://www.arminco.com

Matthew Brealey wrote:
> 
> I need to do an HTTP post from a PHP script; I want to set username=xxxx.
> 
> What is the correct way to do this in PHP?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to