首页 > Windows开发 > 详细

[PHP]WordPress HTTP API

时间:2014-02-09 15:30:57      阅读:398      评论:0      收藏:0      [点我收藏+]

The WordPress HTTP API makes fetching from or posting to remote servers a breeze. It does this by allowing you to be transport agnostic when you fetch or post something. The HTTP API will choose the fastest and most reliable method out of the five different transports available in PHP. It’ll take care of discovering what transports are allowed on that server at that time.

The two most important functions and the ones you will probably use 99% of the time are:

  • wp_remote_get().
  • wp_remote_post().

$body = wp_remote_retrieve_body( wp_remote_get( ‘http://mysite.com/‘ ) );


[PHP]WordPress HTTP API

原文:http://blog.csdn.net/wonderfan/article/details/18979293

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!