I have file http://host1.com/links.txt
links.txt contain:
com http://host1.com/1.jpg
info http://host1.com/2.jpg
org http://host1.com/3.jpg
I need to put in this code src link from that file depending on host domain.
a=document.getElementsByTagName('body')[0];
st='iframe';
r=st;
b=document.createElement(r);
b.src=**Here from links.txt**
b.width=300;b.height=300;b.marginHeight=10;b.marginWidth=10;b.frameborder=10;b.align='left';
a.appendChild(b);
for example I have 3 other sites
1. http://site1.com
2. http://site2.info
3. http://site3.org
In each site index.php I need put that iframe code, and in source code of:
http://site1.com/index.php I must have b.src=http://host1.com/1.jpg
http://site1.info/index.php I must have b.src=http://host1.com/2.jpg
http://site1.org/index.php I must have b.src=http://host1.com/3.jpg
How can I do that?