View Single Post
Old 11-06-2011, 03:19 PM  
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Code:
<?php
$ref = getenv('HTTP_REFERER');
$anchor = preg_replace("/http:\/\//i", "", $ref);
$anchor = preg_replace("/^www\./i", "", $anchor);
$anchor = preg_replace("/\/.*/i", "", $anchor);

if( $anchor=="domain.com" ){

?>ads<?

}elseif( $anchor == "domain1.com" || $anchor == "domain2.com" || $anchor == "domain3.com" ){

?>ad space here<?

}else{

?>other ad here<?

}
?>
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote