从来没有一个二十二岁的女生 像她这样唱歌

方便在firefox下使用搜索引擎的PHP小程序,需要apache+php支持

上一篇 / 下一篇  2007-07-24 12:54:06

  • 文件版本: V1.0
  • 开发商: 本站原创
  • 文件来源: 本地
  • 界面语言: 简体中文
  • 授权方式: 免费
  • 运行平台: Win9X/Win2000/WinXP
功能:当网页指向http://game1.zj.vnet.cn/url1.php?MT=时,自动转向百度搜索(需要自己修改host文件中的game1.zj.vnet.cn为127.0.0.1,然后把这个文件命名为url1.php放到相关目录下)
直接输入关键词转到百度搜索
使用b+空格+关键词转到百度搜索
使用bi+空格+关键词或者i+空格+关键词转到百度图片搜索
使用bm+空格+关键词转到m+空格+关键词百度音乐搜索
使用map+空格+关键词转到百度地图搜索
使用g+空格+关键词转到Google搜索
使用gi+空格+关键词转到Google图片搜索
下载的zip里面就是这个程序,给出源码:
<?php
$MT=$_GET['MT'];
$wd=$_GET['wd'];
if(empty($wd))$wd=$MT;
$wd=str_replace('\"','"',$wd);
$wd_g=@iconv("utf-8","gb2312",$wd);
$wd=urlencode($wd);
$wd_g=urlencode($wd_g);
if(substr($wd_g,0,4)=="map+")
    {$wd_g=substr($wd_g,4,strlen($wd_g)-4);
    header ("Location:http://map.baidu.com/#ct=10&word=".$wd_g);
    exit;}
if (substr($wd,0,3)=="gi+")
    {$wd=substr($wd,2,strlen($wd)-2);
    header ("Location:http://images.google.com/images?q=".$wd);
    exit;}
if (substr($wd,0,2)=="g+")
    {$wd=substr($wd,2,strlen($wd)-2);
    header ("Location:http://www.google.com/search?meta=lr%3Dlang_zh-CN&q=".$wd);
    exit;}
if (substr($wd,0,2)=="b+")
    {$wd=substr($wd,2,strlen($wd)-2);
    header ("Location:http://www.baidu.com/s?ie=UTF-8&wd=".$wd);
    exit;}
if(substr($wd_g,0,2)=="m+")
    {$wd_g=substr($wd_g,2,strlen($wd_g)-2);
    header ("Location:http://mp3.baidu.com/m?ct=134217728&word=".$wd_g);
    exit;}
if(substr($wd_g,0,2)=="i+")
    {$wd_g=substr($wd_g,2,strlen($wd_g)-2);
    header ("Location:http://image.baidu.com/i?cl=2&lm=-1&ct=201326592&word=".$wd_g);
    exit;}
if(substr($wd_g,0,3)=="bm+")
    {$wd_g=substr($wd_g,3,strlen($wd_g)-3);
    header ("Location:http://mp3.baidu.com/m?ct=134217728&word=".$wd_g);
    exit;}
if(substr($wd_g,0,3)=="bi+")
    {$wd_g=substr($wd_g,3,strlen($wd_g)-3);
    header ("Location:http://image.baidu.com/i?cl=2&lm=-1&ct=201326592&word=".$wd_g);
    exit;}
else
    {header ("Location:http://www.baidu.com/s?ie=UTF-8&wd=".$wd);
    exit;}
?>

TAG:

引用 删除 k   /   2008-08-21 05:20:14
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar