Quote:
Originally Posted by Jaspworld
Can this be done in PHP.
|
Yes. There are several ways you could approach this. One way would be to setup a script that would serve the ads and then fetch the output of that script in each site.
Here is a simplified example of how you might output the ad, assuming you have a script called 'adserver.php' that generates the ads:
PHP Code:
$server = 'http://yoursite.com/adserver.php';
$ad = file_get_contents($server);
echo $ad;
A better approach might be to use ajax to retrieve the ad after the page is already loaded.
Another way to accomplish this would be to setup a library that would retrieve ad information from a database that each site has access to.
Quote:
Originally Posted by Jaspworld
Is there some free script already available?
|
Probably, but it's hard to say without knowing more specifically what you need.
Last edited by NullPointer; 07-08-2011 at 09:51 AM..
|