如果自己喜欢动手的话,可以参考以下代码,来自己写
python2.7版本推送代码#! /usr/bin/env python
#coding=utf-8
#百度推送 by tools.bugscaner.com
import httplib
data = open("sitemap.txt","r").read()
allurls = data.split(" ")
nbs = len(allurls)
if nbs/2000*2000 != nbs:
all = nbs/2000 + 1
else:
all = nbs/2000
for x in range(1,all+1):
urlinfos =" ".join(allurls[(x-1)*2000:x*2000])
headers = {"Content-Type":"application/x-www-form-urlencoded"}
conn = httplib.HTTPConnection("data.zz.baidu.com")
try:
conn.request("POST","/urls?site=tools.bugscaner.com&token=QesN4asTDZH1bjfq",urlinfos,headers)
httpres = conn.getresponse()
html = httpres.read()
print html
except Exception,e:
print e
php版本推送代码$urls = array(
'http://www.example.com/1.html',
'http://www.example.com/2.html',
);
$api = 'http://data.zz.baidu.com/urls
site=tools.bugscaner.com&token=QesN4asTDZH1bjfq';
$ch = curl_init();
$options = array(
CURLOPT_URL => $api,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => implode(" ", $urls),
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo $result;
ruby推送示例require 'net/http'
urls = ['http://www.example.com/1.html', 'http://www.example.com/2.html']
uri = URI.parse('http://data.zz.baidu.com/urls
site=www.xxx.com&token=eTk7ychrWZP1pDQD')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = urls.join(" ")
req.content_type = 'text/plain'
res = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(req) }
puts res.body
如果以上环境您都没有安装...步骤1:安装火狐浏览器
步骤2:然后安装附件 hackbar
步骤3:post提交您的网址即可!
简单吧,如果不想折腾,就直接用这个页面提交吧!
本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕,E-mail:975644476@qq.com
本文链接:http://www.gawce.com/tnews/601.html