# Name:php+ajax website SEO query tool
# Author: Youth [q:4908220]
# homepage:http://master8.net
Instructions for use:
1. The server must support at least one of the Allow_url_fopen,curl,fsockopen, please consult the server administrator for details.
2. Please respect the work of others! You can modify and use this program arbitrarily, but do not allow the public release after the modification! This program should also be maintained to maintain this compression package integrity!
3. If you encounter any problems in use, please visit http://master8.net/bbs/for resolution.
Ajax.js
Copy CodeThe code is as follows:
Name:php+ajax website SEO query tool
Author: Youth [q:4908220]
Notice:use It after READ readme.txt
(c) www.master8.net
var xmlHttp;
function MakeRequest (queryString) {
var msXml = new Array ();
Msxml[0] = "Microsoft.XMLHTTP";
MSXML[1] = "MSXML2. xmlhttp.5.0 ";
MSXML[2] = "MSXML2. Xmlhttp.4.0 ";
MSXML[3] = "MSXML2. xmlhttp.3.0 ";
MSXML[4] = "MSXML2. XMLHTTP ";
if (window.xmlhttprequest) {
XmlHttp = new XMLHttpRequest ();
} else {
for (var i = 0; i < msxml.length; i++) {
try {
XmlHttp = new ActiveXObject (Msxml[i]);
Break
} catch (e) {
XmlHttp = new XMLHttpRequest ();
}
}
}
Xmlhttp.onreadystatechange = Getrequest;
Xmlhttp.open (' Post ', ' seo.php ', true);
Xmlhttp.setrequestheader (' Content-type ', ' application/x-www-form-urlencoded ');
Xmlhttp.send (queryString);
}
function Getrequest () {
if (xmlhttp.readystate==4) {
if (xmlhttp.status==200) {
$ (' Seo_result '). InnerHTML = Xmlhttp.responsetext;
}
}
}
seo.php
Copy CodeThe code is as follows:
# Name:php+ajax website SEO query tool
# Author: Youth [q:4908220]
# Notice:use It after READ readme.txt
# (c) www.master8.net
Define (' In_seo ', TRUE);
Error_reporting (E_error);
Set_time_limit (0);
Isset ($_server[' http_referer ') or exit (' Invalid Request ');
Preg_match ("/". $_server[' Http_host '). " /i ", $_server[' http_referer ']) or exit (' Access Denied ');
Header ("content-type:text/html;charset=gb2312");
Include './robot.php ';
Require './function.php ';
@extract ($_post);
Isset ($job) && isset ($domain) or exit (' Invalid Request ');
$domain = Strtolower ($domain);
Is_domain ($domain) or exit (' Invalid domain ');
$jobs =array (' Google ', ' Baidu ', ' Yahoo ', ' msn ', ' Sogou ', ' iask ', ' so163 ', ' Zhongsou ', ' vnet ');
$result = ";
if (In_array ($job, $jobs))
{
$result = Get_seo_info ($domain, $job);
}
ElseIf ($job = = ' Alexa ')
{
$result = Alexa ($domain);
}
ElseIf ($job = = ' Chinarank ')
{
$result = Chinarank ($domain);
}
ElseIf ($job = = ' PageRank ')
{
$result = '. $domain;
if (substr ($domain, 0, 4) = = ' www. ')
{
$domain = substr ($domain, 4);
$result. = '. $domain;
}
}
ElseIf ($job = = ' Sogourank ')
{
$result = Sogourank ($domain). ' '. $domain;
if (substr ($domain, 0, 4) = = ' www. ')
{
$domain = Str_replace ("www.", ", $domain);
$result = $result. ' '. Sogourank ($domain). ' '. $domain;
}
}
!empty ($result) or exit (' Invalid Request ');
Echo '. $result;
?>
http://www.bkjia.com/PHPjc/318248.html www.bkjia.com true http://www.bkjia.com/PHPjc/318248.html techarticle #Name:P hp+ajax website SEO query tool #Author: Love nianhua.liu@gmail.com[q:4908220] #Homepage: http://master8.net instruction: 1. The server must support at least allow_url_fopen,curl,fsock ...