• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

[PHP] POST - in the background

bozley05

NLC
NLC
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 :)
 
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.
 
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.

PHP:
//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);
 
Back
Top