Jump to content

[SOLVED] Send GET variables to another site (without going there)


tommyboy123x

Recommended Posts

i need to send multiple (as in hundreds) of get variables to different websites.  I want to send them the data, but I do not want to visit their site / have the browser actually go there.  Would this make any sense / am i on the right track?

 

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.mysite.com/page.php?getvar1=true&getvar2=false");
curl_exec ($ch);

 

or is there an easier way that i'm simply not seeing?

Link to comment
Share on other sites

All i want to do is send URL GET data without going to the site.

 

so, mysite.com wants to inform theirsite.org [and several others] that something has happened.  It uses a cronjob to check every few minutes for this event and then when necessary, it will inform theirsite.org by sending a GET variable (http://theirsite.org/page.php?foo=bar).  but it still has a few more sites to inform.  How can i do this?  I already left mysite.com so the script has terminated.

Link to comment
Share on other sites

as promised :)

 

echo '<script type="text/javascript">
function ajaxFunction(){
var ajaxRequest;
try{
	// Opera 8.0+, Firefox, Safari
	ajaxRequest = new XMLHttpRequest();
} catch (e){
	// Internet Explorer Browsers
	try{
		ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try{
			ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e){
			// Something went wrong
			alert("Your browser broke!");
			return false;
		}
	}
}
ajaxRequest.open("GET", "http://mysite.com/test.php?a=1&b=2", true);
ajaxRequest.send(null);
}
ajaxFunction();
</script>';

 

all i needed it to do was drop off the info and die, so this worked out perfectly.

 

chrisdburns, pls check ur inbox

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.