Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
Stupid me completely forgot about the socket functions in PHP. Again, that's what I get for having too little coffee last night. Thanks for the help everyone. - Original Message - From: "Chris Shiflett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 11:06 PM Subject: Re: [PHP] submit to a remote form without the use of curl?? Is it possible? > --- [EMAIL PROTECTED] wrote: > > Is it possible with php to submit to a remote form without the > > use of curl? > > You can use fsockopen: > > http://shiflett.org/hacks/php/http_post > > If your version of PHP supports streams, you can use streams: > > http://shiflett.org/hacks/php/streams_post > > Hope that helps. > > Chris > > = > Chris Shiflett - http://shiflett.org/ > > PHP Security - O'Reilly HTTP Developer's Handbook - Sams > Coming December 2004http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
--- [EMAIL PROTECTED] wrote: > Is it possible with php to submit to a remote form without the > use of curl? You can use fsockopen: http://shiflett.org/hacks/php/http_post If your version of PHP supports streams, you can use streams: http://shiflett.org/hacks/php/streams_post Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming December 2004http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
* Thus wrote [EMAIL PROTECTED]: > > > Is it possible with php to submit to a remote form without the use of curl? I'm assuming you want to POST a form verses a GET, since you can easily do a GET form submission like: $fp = fopen('http://domain.com/?get=var', 'r'); in PHP5 you can accomplish this using the new zcontext parameter: $postdata = 'foo=bar'; $contextConf = array( 'http' => array ( 'method' => 'POST', 'header' => "Content-Length: " . strlen($postdata) . "\r\n", 'content' => $postdata ), ); $zcontext = stream_context_create($contextConf); $fp = fopen('http://domain.com/', 'r', $zcontext); Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
[EMAIL PROTECTED] wrote: Is it possible with php to submit to a remote form without the use of curl? I am developing an application on a hosting server that does not have curl available and I need to submit some values to a remote form. Anybody ever do something like this without the use of curl? It's quite possible you can use fsockopen() to do this manually (RFC 2616) or you can make use of any of the classes available for free. in some platforms you might find the POST binary which makes things a lot easier. Thanks, Brent This message was sent using IMP, the Internet Messaging Program. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] submit to a remote form without the use of curl?? Is it possible?
Is it possible with php to submit to a remote form without the use of curl? I am developing an application on a hosting server that does not have curl available and I need to submit some values to a remote form. Anybody ever do something like this without the use of curl? Thanks, Brent This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php