Home >Backend Development >PHP Tutorial >Brush Baidu drop-down keywords

Brush Baidu drop-down keywords

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 09:06:282208browse
Brush Baidu drop-down keywords http://www.tongqiong.com/read.php?tid-91-ds-1.html
  1. //Author: www.tongqiong.com
  2. $url1="http://www.baidu.com/s?bs=www.naligouwu.com&f=8&rsv_bp=1&wd=%CD %F8%C9%CF%B9%BA%CE%EF%CD%F8%D5%BE%B4%F3%C8%AB&inputT=".rand(500,3000)."";
  3. $url2="http: //www.baidu.com/s?bs=%C4%C4%C0%EF%B9%BA%CE%EF&f=8&rsv_bp=1&wd=%B9%BA%CE%EF&inputT=".rand(500,3000) ."";
  4. $url3="http://www.baidu.com/s?bs=www.naligouwu.com&f=8&rsv_bp=1&wd=naligouwu&inputT=".rand(500,3000)."";
  5. $url4 ="http://www.baidu.com/s?bs=%C4%C4%C0%EF%B9%BA%CE%EF&f=8&rsv_bp=1&wd=naligouwu&inputT=".rand(500,3000)."" ;
  6. function parseUrl($url)
  7. {
  8. $parse_url = parse_url($url);
  9. return (!empty($parse_url['scheme']) && !empty($parse_url['host']));
  10. }
  11. //Get the content of url
  12. function getUrlContent($url)
  13. {
  14. $content = '';
  15. if(!parseUrl($url))
  16. {
  17. $content = @file_get_contents($url);
  18. }
  19. else
  20. {
  21. if(function_exists('curl_init'))
  22. {
  23. $ch = curl_init();
  24. curl_setopt($ch, CURLOPT_URL,$url);
  25. curl_setopt($ch, CURLOPT_TIMEOUT, 5);
  26. curl_setopt($ch , CURLOPT_USERAGENT, _USERAGENT_);
  27. curl_setopt($ch, CURLOPT_REFERER,_REFERER_);
  28. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  29. $content = curl_exec($ch);
  30. curl_close($ch);
  31. }
  32. else
  33. {
  34. $content = @file_get_contents($url);
  35. }
  36. }
  37. return $content;
  38. }
  39. getUrlContent($url1);
  40. getUrlContent($url2);
  41. getUrlContent($url3);
  42. getUrlContent($url4 );
  43. echo "Success";
  44. //Author: www.tongqiong.com
  45. ?>
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn