Sometimes, you may need connection blocking from the link posted on the certain blog or site. In this case, you can block easilly by HTTP_REFERER.
Followings are the simple example blocking connection from foo.com posted content. But following example allows user to connect to the website directly. For instance, user can connect to http://foo.com when user put url on the browser, but in case of clicking link, the site can know where the connection comes from.
<?
// connection blocking Example
// Programmed 2008 by Kurapa Chunun Kang (kurapa@kurapa.com)
if (ereg('foo.com', $_SERVER['HTTP_REFERER']))
{
?><script language=javascript>self.location='http://xxx.com';</script><?
exit;
}
.
.
.
?>
// connection blocking Example
// Programmed 2008 by Kurapa Chunun Kang (kurapa@kurapa.com)
if (ereg('foo.com', $_SERVER['HTTP_REFERER']))
{
?><script language=javascript>self.location='http://xxx.com';</script><?
exit;
}
.
.
.
?>
Another posts included in "PHP"
| File downloading via HTTP (0) | 2008/01/21 |
| How to extract file name from given URL ? (0) | 2008/01/21 |
| How to download a file from a certain URL to server ? (0) | 2008/01/21 |
| XMLRPC example (0) | 2008/01/07 |
| How to upload attachments such as image by metaWeblog API ? (0) | 2008/01/07 |
| How to post blog content by metaweblog API ? (3) | 2008/01/02 |
| Posting to a Wordpress Blog Via XMLRPC Using Blogger API (1) | 2007/12/15 |
| foreach loop (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 00:15
moneyideas
-
Subject different money making ideas
2010/01/29 08:37
moneyideas
-
Subject different money making ideas
2010/01/31 16:43
moneyideas

Prev

Rss Feed