Re: php forcing a post??

From: Date: Tue, 20 Feb 2007 21:41:02 +0000
Subject: Re: php forcing a post??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-249117@lists.php.net to get a copy of this message
On Tue, February 20, 2007 1:45 pm, blackwater dev wrote: > I currently have an html page that posts to a cgi function. I need to > interject some php in the middle. So, the form will post to itself, > the php > page will catch the post, check on thing and then pass along to the > cgi page > but the cgi page only handles posts. How can I still php in the > middle and > still have it 'post' to the cgi page? Google for "Rasmus Lerdorf" "function PostToHost" It's a lot simpler than you'd think, actually. You just fsockopen to port 80, compose a valid POST HTTP request and write it out. If you have file uploads in the original form, life gets slightly more complex, as you have to compose a more complicated POST, I guess, but it should still be a lot easier than you may be thinking. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#249117) next »