PDA

View Full Version : [PHP] POST - in the background



bozley05
May 20th, 2004, 03:40
When a site user submits a form via POST method on my site, ie. to submit.php I want the submit.php file to post the info elsewhere on a remote server, without the user seeing or going to that page.

Do you use socket() or something?? I donno, I hope someone understands what I am on about.

Thanks :-)

bloodyveins
May 20th, 2004, 08:48
yeah, communcation through socket is a possible solution to this problem. one thing to reckon is everything depends on the problem itself and the environment around the possible solutions. so, you should find your own approach to this problem based on system spesification and methods available.

Dan Grossman
June 4th, 2004, 23:41
Use the Snoopy PHP class, you'll LOVE it, I know I do:

http://sourceforge.net/projects/snoopy/

Submitting a form or doing ANYTHING with remote sites is extremely easy and almost everything is built into the class for you.



//example.php
include("Snoopy.class.php");
$snoopy = new Snoopy();

$submit_url = "http://www.example.com/submit.php";
$snoopy->cookies["username"] = "dangrossman";
$submit_vars["var1"] = 35;
$submit_vars["anotherforminput"] = "$stuff";
$submit_vars["submit1"] = "Confirm";

$snoopy->submit($submit_url,$submit_vars);

bozley05
June 5th, 2004, 01:55
me likes... great little class that one!!! :)