View Full Version : Simulating post with php
04-22-2003, 08:52 PM
How can php simulate posting to a page ?
Like how do I get send.php to post something to blah.php and blah.php can use $_post etc without the user having to do anything ?
Kind of like how you can link to a page with ?one=blahtwo=xyz etc and then the page can process it with $_get.
04-22-2003, 08:59 PM
<form action="blah.php" method="post" name="someform">
<input type="hidden" name="postvar" value="some value" />
That would make the $_POST vars available on blah.php.
04-23-2003, 05:01 PM
Either use snoopy, a class that simulates the behaviour of a browser
or use the cURL extension if it's enabled on your host
Of course you could also use fsockopen() and manually code every single HTTP request, but that's a bit too low-level for my taste and takes too long.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.