PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Sat Nov 01, 2014 5:48 pm
Been working with XML a bit more and I found something that might have some potential
Code: Select all
// http://www.amazon.com/dp/YOUR10DIGITASIN
var xmlhttp = new XMLHttpRequest();
var url = "http://www.amazon.com/dp/" + AISN
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
temp = '<iframe src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=cpa07-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=';
temp += AISN;
temp += '" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
document.write(temp+='\n');
}
}
this the right idea?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Celauran
Moderator
Posts: 6427 Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada
Post
by Celauran » Sun Nov 02, 2014 9:57 am
It's unclear what specifically you're trying to accomplish, so it makes it hard to say whether or not that's the right idea. Two things immediately come to mind, though. 1. That's an awful lot of hardcoded values. 2. XML? Really? Is JSON not available?
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Nov 05, 2014 1:10 pm
I was wanting to check to see that a given product is still in the catalog before showing an ad
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Wed Nov 05, 2014 4:39 pm
I would focus more on getting click throughs so your referral cookie is set; because it doesn't matter what they buy, you'll get a kickback.
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Nov 05, 2014 5:41 pm
I am also experimenting with some other ad ideas, when in doubt add more code
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP