Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Redirect unique visit with cookies
SUBMITTED BY:
Guest
DATE:
Oct. 26, 2012, 12:40 p.m.
FORMAT:
PHP
SIZE:
457 Bytes
Raw
Download
Tweet
HITS:
1911
Go to comments
Report
<?php
//Checks if there is a cookie
if
(
isset
(
$_COOKIE
[
"cookiename"
]))
//if cookie is set
{
header
(
"Location: redirectDOTcom"
);
//redirect to
}
else
{
setcookie
(
"cookiename"
,
"something"
,
time
()
+
3600
*
24
,
""
,
"domainname"
);
//set cookie name, variable and expiring time
header
(
"Location: redirectuniquehit "
);
//redirect the unique view
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus