Welcome Guest, Not a member yet? Register   Sign In
Passing data to an object or iframe
#1

[eluser]JWarren[/eluser]
Hi, guys-

This question isn't directly related to CI, but hopefully someone can help me anyway.

I'm trying to insert some code between domains with a little data attached to it. I've thought about an iframe:
Code:
<iframe src="http://someotherdomain.com/class/function"></iframe>
or an object:
Code:
<object data="http://someotherdomain.com/class/function" type="text/html"></object>

My question is how do I pass some data to the page on the other domain? I just need the remote page to know that foo=bar in this case. On another page foo could = bat, etc.

Hopefully that makes sense. Thanks in advance.
#2

[eluser]Colin Williams[/eluser]
How does someotherdomain accept data? URI parameters? Query string?
#3

[eluser]JWarren[/eluser]
I'd rather not use URI parameters or a query string because of special characters. Hopefully this is more clear:

Code:
<object data="http://someotherdomain.com/class/function" type="text/html">
   <param name="css" value="http://domain.com/style.css" />
   <param name="redirect" value="http://domain.com/test.php" />
&lt;/object&gt;
Would there be any way to get the css and redirect values in http://someotherdomain.com/class/function?
#4

[eluser]Colin Williams[/eluser]
Everything available will be in the request header, so check the header. I doubt you'll get anything though.
#5

[eluser]kiedis[/eluser]
sophisticated way
XML-RPC and XML-RPC Server Classes

simple way (the other domain use CodeIgniter)
Code:
&lt;frame src="http://someotherdomain.com/class/function/bar"&gt;&lt;/iframe>
&lt;iframe src="http://someotherdomain.com/class/function/bat"&gt;&lt;/iframe>

or the other domain don't use CodeIgniter

Code:
&lt;iframe src="http://someotherdomain.com/somepage.php?foo=bar"&gt;&lt;/iframe>
&lt;iframe src="http://someotherdomain.com/somepage.php?foo=bat"&gt;&lt;/iframe>




Theme © iAndrew 2016 - Forum software by © MyBB