Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php header refresh possible in this script?
Old 02-13-2009, 10:44 PM php header refresh possible in this script?
Novice Talker

Posts: 14
Trades: 0
Is it possible to do a php header refresh or meta-refresh in this script to remove the referer? - Thanks!

<?
function check_search_engine() {
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
$user_agent = '';
} else {
$user_agent = $_SERVER['HTTP_USER_AGENT'];
}

$search_engines[] = 'Fast';
$search_engines[] = 'Slurp';
$search_engines[] = 'Ink';
$search_engines[] = 'Atomz';
$search_engines[] = 'Scooter';
$search_engines[] = 'Crawler';
$search_engines[] = 'bot';
$search_engines[] = 'Genius';
$search_engines[] = 'AbachoBOT';
$search_engines[] = 'AESOP_com_SpiderMan';
$search_engines[] = 'ia_archiver';
$search_engines[] = 'Googlebot';
$search_engines[] = 'UltraSeek';
$search_engines[] = 'Google';

foreach ($search_engines as $key => $value) {
if ($user_agent != '') {
if(strstr($user_agent, $value)) {
$is_search_engine = 1;
}
}
}

if (isset($is_search_engine)) {
return TRUE;
} else {
return FALSE;
}
}

if (check_search_engine() == TRUE) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
</body>
</html>
<?
} else {
$eb = $_REQUEST['eb'];
$sid = $_REQUEST['sid'];
if ($eb) {
$eb = base64_decode($eb);
if (isset($sid)) {$eb .= "&sid=" . $sid;}
header("Location: " . $eb);
exit;
}
}
?>
abcdabcd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-14-2009, 04:10 PM Re: php header refresh possible in this script?
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
No, generally you cannot remove the refer (for security and tracking purposes). You can only remove the refer by getting the end user to disable the refer header in their browser.

Also, in future post php code in [php] tags.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 02-14-2009, 04:32 PM Re: php header refresh possible in this script?
Novice Talker

Posts: 14
Trades: 0
are you saying you can't remove the referer at all? you can remove it by doing a meta refresh. so I was wondering if it was possible to add it in this script.
abcdabcd is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php header refresh possible in this script?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23925 seconds with 12 queries