PHP query Baidu included query code

Source: Internet
Author: User
Keywords Web Programming PHP Tutorials
Tags .url code download echo function http php programming

PHP to provide PHP queries written query code download Oh, look at it very easy oh.

function Baidu ()
{
Global $murl, $furl;
$url = "Http://www.baidu.com/s?wd=site: $furl";
$page = file_get_contents ($url);
$PageNum = "0";
$PageNum = Str_replace (",", "", Cut ($page, "Find relevant pages about", "article"));
if ($PageNum = = "") $PageNum = Str_replace (",", "", Cut ($page, "Find relevant page", "article"));
if ($PageNum = = "") $PageNum = "0";
echo "<a href=". $url. "' target= ' _blank ' > $PageNum </a> ';
}

Function Baidukz ()
{
 global $murl, $furl
  $url = "http://www.baidu.com/s?wd= $furl";
  $page = file_get_contents ($url);
  $kzdate = "0";
  $kzdate = Cut ($page, "<font color= #008000 > $furl", "</font>");
 if ($kzdate!= "") {
  ///37K 2008-9-13
   $kzarray = explode (' K ', $kzdate);
   $kzdate = Trim ($kzarray [1]);
  if (Trim ($kzarray [1])!= "") {
   echo "<a href=". $url. "' target= ' _blank" >$ Kzdate</a> ";
  }
 
 
 else{
  echo Escape (none);
 }

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.