How to block a connection from the certain site ? | ||
| ||
| 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; } . . . ?> | ||
| | ||
| |