skwap Posted July 30, 2011 Share Posted July 30, 2011 Hello Friends, Iam developing a mini website like adsense.. I already provided PHP Publisher code for publishers to run ads but i want to add a java script code like adsense. I mean i want to return the value in java script which fetch from this url http://my-site.com/ads/ad.php?id=(user id) Consider above php code <?php $id = $_GET['id']; $result = file_get_contents("http://my-site.com/ads/ad.php?id=$id"); echo $result; ?> I want to change above php code to java script. Anyone can help me to create a .js page & also to show the ads through java script... ?? Quote Link to comment https://forums.phpfreaks.com/topic/243244-java-script-code-like-adsense-ad-code/ Share on other sites More sharing options...
voip03 Posted July 30, 2011 Share Posted July 30, 2011 location replace http://www.w3schools.com/jsref/met_loc_replace.asp Quote Link to comment https://forums.phpfreaks.com/topic/243244-java-script-code-like-adsense-ad-code/#findComment-1249406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.