Help the Home (www.Bkjia.com) tutorial today in Baidu Bar see a post, click inside the picture will enter their own set of good links. Seems unlikely, because Baidu only allows you to fill in a picture link, do not allow the image to add links. In fact, through PHP to determine whether the image is referenced, or in the view is good, the code is as follows:
The following is the referenced content: $fileLine = File (dirname (__file__). "/file.ini"); $nameMap = Array (); foreach ($fileLine as $item) { $item = Explode ("", $item); if (count ($item) = = 3) { $nameMap [$item [0]] = Array ($item [1], $item [2]); } }
$name = $_get[' name ']; if (!isset ($nameMap [$name])) { Exit (0); } Header ("Cache-control:no-cache, must-revalidate"); http/1.1 Header ("Expires:sat, Jul 1997 05:00:00 GMT"); Date in the past if (Isset ($_server[' http_referer ')) && stripos ($_server[' http_referer '], "Baidu")!== false) { Header ("Content-type:image/png"); Echo Get ($nameMap [$name][0]); } else { Header ("Location:".) $nameMap [$name][1]); Exit (0); } |
File.ini This configuration:
The following is the referenced content: Mysql.jpg Http://www.bkjia.com/bkjia.com/images/liehuo2009/logo.gif http://www.bkjia.com/ Lyf.jpg http://www.bkjia.com/uploads/allimg/090904/1231133495-0-lp.jpg http://www.bkjia.com/ |
Call this call:
Http://yourhost/image.php?name=lyf.jpg
This image will be able to achieve the function of the bar. Very simple, but very creative. However, this method can not be under Firefox!
http://www.bkjia.com/PHPjc/364323.html www.bkjia.com true http://www.bkjia.com/PHPjc/364323.html techarticle Fire Network (liehuo.net) tutorial today in Baidu Bar see a post, click inside the picture will enter their own set of good links. It seems unlikely, because Baidu only allows you to fill in ...