Jump to content

Grabbing a variable's value hosted in a different server


LLeoun

Recommended Posts

Hi all,

 

Here's my index.php:

 

<iframe src='http://www.differentServerFromParent.com/mypage.htm' scrolling='no' frameborder='0' allowtransparency='yes' ></iframe>

 

mypage.htm (which in case you haven't notice the subtlety of the domain's name is hosted in a different server from index.php) has a js file that is sending myid 's value (myid is a dynamic variable) via post using jQuery's $.post like this:

 


var theurl = "http://www.differentServerFromParent.com/proxy.php?proxy_url=http://www.serverWhereIndexIs.com/index.php";
$.post(theurl,{"myid":myid_value});

And using Troy Wolf's proxy.php (http://www.troywolf.com/articles/php/class_http/proxy.phps)

 

I need to grab myid in index.php in order to use it there, please help!!

 

In case it helps, Firebug's console says:

 

The Post Tab shows myid and its value correctly every time a new id is posted.

Then if I request and echo myid in index.php,  the Response Tab for each id shows its value, but nothing is echoed in index.php it is echoed just in the Response Tab...

Is the iframe causing trouble or the cross-browsing?

 

Thanks a ton in advance!!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.