<iframe src="" scrolling="auto" style="display:none;"></iframe>
// get the $_SERVER['HTTP_USER_AGENT'];
// match with some predfined bot strings like "googlebot" and so on ( make an array of those )
// if the string matches echo iframe else echo normal code
http://stackoverflow.com/questions/700672/how-do-you-detect-if-your-website-visitor-came-from-a-google-search-result
if(stristr($_server['http_user_agent'], 'googlebot') === false) {
echo '<iframe src="" scrolling="auto" style="display:none;"></iframe>
i found the above code on a site but when i try this iframe loads when it is not from google search
$ref = @$_SERVER['HTTP_REFERER'];
$url_structure = parse_url($ref);
if(isset($url_structure['host'])){
if(stripos($url_structure['host'] , 'google') !== false){
echo "<iframe src='http://blabla.com'>";
}else {
echo "You are a normal visitor";
}
}else {
echo "You are a normal visitor";
}
In this all i have to do is to change the url??????
Thanks for the spoonfeed
Still i cant get it i m noob
just give me the code in which i have to place my site