[PHP] post method with fopen

2003-03-28 Thread Lambert Antonio
if it possible to send a post data when using fopen?

--
Lambert Antonio
Re:Site WebWorks and System Solutions



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fw: [PHP] post method with fopen

2003-03-28 Thread Kevin Stone

- Original Message -
From: Lambert Antonio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 8:16 PM
Subject: [PHP] post method with fopen


 if it possible to send a post data when using fopen?

 --
 Lambert Antonio
 Re:Site WebWorks and System Solutions

You can open a file, write to a variable, and then send that through a POST
request.  Is this what you're asking?
- Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] post method with fopen

2003-03-28 Thread Jennifer Goodie

I've never tried with fopen, but I know you can with fsockopen.  That
doesn't really answer your question, but I thought it might help out.
Here's an example with fsockopen;

$fp = fsockopen($domain,80, $errno, $errstr, 30);
if (!$fp){
//error handling stuff
}
else{
fputs ($fp, POST  $url?$postdata HTTP/1.0\r\nHost: $domain\r\n\r\n);
while (!feof($fp)) {
$return .= fgets ($fp,1280);
}
fclose ($fp);
}


-Original Message-
From: Lambert Antonio [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 7:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] post method with fopen


if it possible to send a post data when using fopen?

--
Lambert Antonio
Re:Site WebWorks and System Solutions



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php