Php link batch query tool download

Source: Internet
Author: User

Friendly connections are commonly used by webmasters. If there are too many connections on one network, it will be too much trouble to check them one by one. For convenience, we have provided php links and batch query programs, you only need to enter a friendly connection to query it.

Friendly connections are commonly used by webmasters. If there are too many connections on one network, it will be too much trouble to check them one by one. For convenience, we have provided php links and batch query programs, you only need to enter a friendly connection to query it.

<? Php
$ Max_allow_links = 100; // maximum number of connections allowed for the license check

// This function is reproduced on www.lian123.com. Thank you very much.
Function my_file_get_contents ($ url, $ timeout = 30 ){
If (function_exists ('curl _ init ')){
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_CONNECTTIMEOUT, $ timeout );
$ File_contents = curl_exec ($ ch );
Curl_close ($ ch );
} Else if (ini_get ('Allow _ url_fopen') = 1 | strtolower (ini_get ('Allow _ url_fopen') = 'on '){
$ File_contents = @ file_get_contents ($ url );
} Else {
$ File_contents = '';
}
Return $ file_contents;
}

// Start the check
If (isset ($ _ GET ['mod']) & $ _ GET ['mod'] = 'check _ now' & isset ($ _ GET ['id']) & isset ($ _ GET ['my _ url']) & isset ($ _ GET ['url']) & isset ($ _ GET ['Auto _ check']) {
$ Js_id = 'parent.doc ument. getElementById ("s _ '. $ _ GET ['id'].'"). innerHTML ';
If (strstr ($ _ GET ['url'], $ _ GET ['my _ url']) {
Echo '<script>'. $ js_id. '= "internal link"; </script> ';

} Else if (! Stristr ($ _ GET ['url'], 'HTTP ://')){
Echo '<script>'. $ js_id. '= "error link"; </script> ';
} Else {
$ S = my_file_get_contents ($ _ GET ['url']);

If (trim ($ s) = ''){
Echo '<script>'. $ js_id. '= "failed to capture content"; </script> ';
} Else if (stristr ($ s, $ _ GET ['my _ url']) {
Echo '<script>'. $ js_id. '= "<font color = green> contains the link, which is checked </font>"; </script> ';
} Else {
Echo '<script>'. $ js_id. '= "<font color = red> no link found. Please check </font>"; </script> ';
}
}

If ($ _ GET ['Auto _ check'] = 1 ){
Echo '<script> parent. checkLink ('. ($ _ GET ['id'] + 1). '); </script> ';
}

Exit ('<br/> done! ');
 
}
?>
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> automatic check program for friendship links in website creation </title>
<Meta name = "generator" content = "editplus"/>
<Meta name = "author" content = "www.zuowangzhang.com.cn"/>
 
<Meta name = "description" content = "we were very BS and both parties exchanged the home page links, however, the other party cancels the friendship link exchanged with you at Will (that is, the other party removes the link to your website, but you still keep the link) with this program, you can quickly and automatically check your link URL to see if your link has been removed from your website. "/>
<Style>
Body, td {font-size: 9pt; font-family: arial ;}
A: link, a: visited {color: blue ;}
A: hover {color: red ;}

A. black: link, A. black: visited {color: black; text-decoration: none ;}

. Main_tb {width: 580px ;}
. Main_tb. tb_title {background-color: # CCFFFF ;}
. Main_tb. tr_title {background-color: # A6D9D2; height: 40px ;}

</Style>
<Base target = _ blank> </base>
</Head>

<Body>
<Iframe src = "about: blank" width = 0 height = 0 name = "hidden_iframe" id = "hidden_iframe"> </iframe>

<Script type = "text/javascript">
<! --
My_url = '';
Checking_str = "checking ...";
Check_time_out = 25000;
Auto_check = 0;


Function checkZuoWangZhang (){
Var all_code = window. frames ["zuoWangZhang.com.cn" 2.16.doc ument. body. innerHTML;
If (all_code.indexOf ('HTTP: // ') =-1 ){
Alert ("copy the text and image links of your website Ctrl + c and paste Ctrl + v in ");
Return false;
}
If (f. my_url.value.indexOf ('.') =-1 ){
Alert ("Enter your website Homepage Address ");
Return false;
}

If (f. my_url.value.indexOf ('HTTP: // ') =-1 ){
F. my_url.value = 'HTTP: // '+ f. my_url.value;
}

If (f. my_url.value.substr (f. my_url.value.length-1, 1) = '/'){
F. my_url.value = f. my_url.value.substr (0, f. my_url.value.length-1 );
}

F.html _ code. value = all_code;
Return true;
}

Function checkTimeout (id ){
If (document. getElementById ('s _ '+ id). innerHTML! = Checking_str ){
Return false;
}
Document. getElementById ('s _ '+ id ). innerHTML = "may time out, <a href = '# 'onclick = 'Return checkLink (" + id + ");'> re-check </a> ";

If (auto_check = 1 ){
CheckLink (id + 1 ));
}
Return true;
}

Function checkLink (id ){
If (document. getElementById ('s _ '+ id) = null ){
Auto_check = 0;
Return false;
}
If (auto_check = 1 & document. getElementById ('s _ '+ id). innerHTML. indexOf ('timeout ')! =-1 ){
Alert ("Please wait until the automatic check is complete before proceeding! ");
Return false;
}
Document. getElementById ('den den _ iframe'). src = 'check _ links. php? Mod = check_now & url = '+ escape (document. getElementById ('U _ '+ id ). href) + '& id =' + id + '& my_url =' + escape (my_url) + '& auto_check =' + auto_check + '';

Document. getElementById ('s _ '+ id). innerHTML = checking_str;

SetTimeout ("checkTimeout (" + id + ")", check_time_out );

Return false;
}

Function autoCheckLink (id ){
CheckLink (id );
// SetTimeout ("checkLink (" + (id + 1) + ")", (check_time_out + 1000 ));
}
// -->
</Script>

 

<Center>
<H4> friendly link automatic check program We are very BS people. At that time, both sides exchanged the homepage link, but the other party canceled the friendship link with you at Will (that is, the other party removed the link to your website, but you still keep its link)
<Br/> & nbsp; <br/>
With this program, you can quickly and automatically check your link URL to see if your link has been removed from your website.

<Br/>

<? Php

// Display the obtained link address
If (isset ($ _ POST ['html _ Code']) & isset ($ _ POST ['my _ url']) {
 
Preg_match_all ("/<a [strn] {1,} [^ <] {0,} href = [" '] {0,} (https? : //. *) [Strn "'>] {1,}/isU", stripslashes ($ _ POST ['html _ Code']), $ ary );

If (isset ($ ary [1]) & count ($ ary [1])> 0 ){
Echo '<table bordercolordark = "# ffffff" align = "center" bordercolorlight = "#000000" border = "1" cellspacing = "0" cellpadding = "4" class = main_tb> <tr> <td colspan = 10 class = tb_title> <font size = "4"> <B> Start Check </B> </font>
<Br/>
Check whether the following URLs contain links of <font color = green> '. $ _ POST ['my _ url'].' </font>
</Td> </tr>
<Tr class = tr_title>
<Td> serial number </td>
<Td align = left> URL to be checked </td>
<Td> check result </td>
</Tr>
';
For ($ I = 0; $ I <count ($ ary [1]); $ I ++ ){

$ Check_str = ($ _ POST ['Auto _ check'] = 0 )? '<A href = "#" onclick = "return checkLink ('. $ I. '); "> Start Check </a>': '<font color = gray> waiting... </font> ';

Echo '<tr>
<Td> '. ($ I + 1).'. </td>
<Td align = left> <a href = "'. $ ary [1] [$ I]. '"id = u _'. $ I. 'Target = _ blank> '. $ ary [1] [$ I]. '</a> </td>
<Td id = s _ '. $ I.'> '. $ check_str.' </td>
</Tr> ';

If ($ I> $ max_allow_links ){
Break;
}
}
Echo '</table> ';
}
Echo '<script> my_url = "'. trim ($ _ POST ['my _ url']). '"; auto_check = '. (int) $ _ POST ['Auto _ check']. '; </script> ';

If ($ _ POST ['Auto _ check'] = 1 ){
Echo '<script> autoCheckLink (0); </script> ';
}
 
}

?>
 

<Form method = "post" action = "check_links.php" name = "formZuoWangZhang" target = _ top>

Must include the address (home page of your website): <input type = "text" name = "my_url" size = 50 value = "<? Php if (isset ($ _ POST ['my _ url']) {echo $ _ POST ['my _ url'];}?> "/>
<Br/>
Automatic or manual check: <select name = "auto_check"> <option value = 1> automatic </option> <option value = 0> manual </option> </select>
<Br/> & nbsp; <br/>
The website you want to check (The following is a visual input box. copy and paste the text link and image link below): <br/>
<Iframe id = "zuoWangZhang.com.cn" name = "zuoWangZhang.com.cn" height = "150" width = "600" style = "padding: 0px;"> </iframe>
<Script> window. frames ["zuoWangZhang.com.cn" 2.16.doc ument. designMode = "On"; </script>

 

<Br/> & nbsp; <br/>
<Input type = "hidden" name = "html_code"/>

 

<Table width = 600>
<Tr>
<Td width = 100 align = center> & nbsp; </td>
<Td width = 400 align = center> <input type = "submit" onclick = "return checkZuoWangZhang ();" value = "Start Check"/> </td>
<Td width = 100 align = right> <a href = # onclick = "return setTestLinks (this);"> Load Test Data </a>
</Td>
</Tr>
</Table>
 
<Br/> & nbsp; <br/>

If you do not know how to start, click <a href = # onclick = "return setTestLinks (this);"> Load Test Data </a>, click <input type = "submit" onclick = "return checkZuoWangZhang ();" value = "Start Check" style = "height: 19px;"/> to view the demo

<Br/> & nbsp; <br/>

<! -- You are welcome to reprint it, but please keep the following text and link. The link will be changed by BS. Thank you for your cooperation. -->

This program by the <a href = "http://www.ZuoWangZhanG.com.cn/" class = black> do website </a> "original, completely open source! <A href = "http://www.zuowangzhang.com.cn/download/check_links.zip"> download </a>
<Br/> & nbsp; <br/> you are welcome to reprint, but please keep the text of <a href = "http://www.ZuoWangZhang.com.cn/ZuoWangZhan/RuHeZuoWangZhan/" class = black> how to do the website </a>, thank you!

<Br/> & nbsp; <br/>

Welcome to <a href = "http://www.zuowangzhang.com.cn/hbcms/user/add_msg.php? To_user_id = 1 & to_user_name = website administrator "target = _ blank> give feedback to the author </a>. I will continuously improve it and release a better version.

</Form>
<Script type = "text/javascript">
F = document. formZuoWangZhang;
</Script>


</Center>

<? Php
If (isset ($ _ POST ['html _ Code']) {
Echo'
<Div id = old_links style = "display: none;">
'. Stripslashes ($ _ POST ['html _ Code']).'
</Div>
<Script type = "text/javascript">

Function setOldLinks (){

Window. frames ["zuoWangZhang.com.cn" pai.doc ument. body. innerHTML = document. getElementById ("old_links"). innerHTML;
Document. getElementById ("old_links"). innerHTML = "";
}
SetTimeout ("setOldLinks ()", 3000 );

</Script> ';
 
}
 
?>


<P> & nbsp; </p>

 

 

 

 

 


<Span id = test_links>

<TABLE align = center cellpadding = '1' cellspacing = '0' style = "font-size: 9pt;">
<TR>
<TD colspan = "6">
My connections:
</Td> <TD colspan = 2>
<Div align = right>
</Td> </tr> <tr>
<! -- Text link -->
<Td>
<A href = "http://www.hao123.com/"> Hao123
</Td>
<Td>
<A href = "http://www.265.com/"> 265
</Td>
<Td>
<A href = "http://site.baidu.com/"> Baidu
</Td>
<Td>
<A href = "http://www.zuoWANGZHANG.com.cn/"> website creation </a>
</Td>
<Td>
<A class = "l" href = "http://site.yahoo.com.cn/" target = "_ blank"> Yahoo website </a>
 
</Td>
<Td>
<A href = "http://www.baidu.com/"> baidu
</Td>

<Td>
<A href = "http://daohang.google.cn/" target = "_ blank"> Google navigation </a>
</Td>
</Tr>

<! -- Image link -->
<Tr>

 
<Td>
<A href = "http://www.lian123.com/"> </A>
</Td>
<Td>
<A href = "http://www.yisou.com/"> </A>
</Td>
<Td>
<A href = "http://www.google.cn/"> </A>
</Td>
<Td>
 
<Td>
<A href = "http://www.jipiaojiage.cn/"> </A>
</Td>
<Td>
<A href = "http://www.google.com/"> </A>
</Td>
<Td>
<A class = "l" href = "http://123.sogou.com/" target = "_ blank"> sogou website </a>
</Td>
</Tr>
<Tr> <td colspan = 10>
Other test links:
<A href = "http://www.163.com/"> 163 internal link test </a>
</Td> </tr>
</TABLE>

 

</Span>


<Script type = "text/javascript">
<! --

Document. write ('<sty' + 'Le> # te' + 'st _ li' + 'nks {disp' + 'lay: no' + 'ne ;} </sty '+ 'Le> ');
Function setTestLinks (t ){
Window. frames ["zuoWangZhang.com.cn" 2.16.doc ument. body. innerHTML = document. getElementById ('test _ links '). innerHTML;

Document. getElementById ('test _ links '). innerHTML = '';

F. my_url.value = 'HTTP: // www.163.com /';
Return false;
}

 
 
 
// -->
</Script>

 

 


</Body>
</Html>


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.