当前位置:Gxlcms > PHP教程 > 刷百度下拉关键词

刷百度下拉关键词

时间:2021-07-01 10:21:17 帮助过:9人阅读

刷百度下拉关键词 http://www.tongqiong.com/read.php?tid-91-ds-1.html
  1. //作者: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. //获取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 "成功";
  44. //作者:www.tongqiong.com
  45. ?>

人气教程排行