C++ 技术中心

   :: 首页 :: 联系 ::  :: 管理
  160 Posts :: 0 Stories :: 87 Comments :: 0 Trackbacks

公告

郑重声明:本BLOG所发表的原创文章,作者保留一切权利。必须经过作者本人同意后方可转载,并注名作者(天空)和出处(CppBlog.com)。作者Email:coder@luckcoder.com

留言簿(27)

搜索

  •  

最新随笔

最新评论

评论排行榜

1.新建http.py如下:
import urllib
import urllib2
url 
= 'http://push.hao123.com/apis/test_send_msg.php'
values 
= {'g_id':'1027019902',
          
'm_time_to_send':'1386049369',
          
'm_display':'1',
          
'm_push_type':'2'
          ,
'm_by_timezone':'0'
          ,
'm_msg':'中华人民共和国万岁'
          ,
'mt_id':'0',
          
'm_iggid_file':'33600458'
         }
data 
= urllib.urlencode(values)
print data
req 
= urllib2.Request(url, data)
response 
= urllib2.urlopen(req)
the_page 
= response.read()
print the_page

注意以下包含中文,需把文件另存为utf-8格式。
然后执行:python http.py
posted on 2013-12-03 14:08 C++技术中心 阅读(4083) 评论(0)  编辑 收藏 引用 所属分类: 其他编程

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理