Php+ajax website SEO Query tool provides code 1th/3 page _php instance

Source: Internet
Author: User
# Name:php+ajax website SEO query tool
# Author: Time <nianhua.liu@gmail.com> [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 specifically.
2. Please respect the achievements of other people's work! You can modify and use this program arbitrarily, but do not allow changes to be published publicly! This program should also maintain the integrity of this compression package!
3. If you encounter any problems in use, please visit http://master8.net/bbs/for resolution.
Ajax.js
Copy Code code as follows:

Name:php+ajax website SEO query tool
Author: Time <nianhua.liu@gmail.com> [q:4908220]
Notice:use It after READ readme.txt
(c) 2007 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 Code code as follows:

<?php
# Name:php+ajax website SEO query tool
# Author: Time <nianhua.liu@gmail.com> [q:4908220]
# Notice:use It after READ readme.txt
# (c) 2007 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 = ' if (substr ($domain, 0, 4) = = ' www. ')
{
$domain = substr ($domain, 4);
$result. = ' }
}
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 ' ?>

Current 1/3 page 123 Next read the full text
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.