如何在 PHP 中自动 ping 到 pingomatic?
当我更新我的博客时,我想自动 ping 到 pingomatic,因为它是由 wordpress 完成的。 Pingomatic 使用 XMLRPC,但我不知道它是如何工作的。有人可以帮助我吗?
I want to ping automatically to pingomatic, when ever i update my blog, as it is done by the wordpress. Pingomatic uses the XMLRPC, but I don't know how it works. Can someone help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
乍一看似乎很容易。该表单是一个带有 method=get 的纯 HTML 表单,我没有看到任何 XMLRPC 代码。我想说,您只需填写一次表单,单击提交,然后将结果 URL 从地址栏复制到 PHP
http_get()
或fopen()
中。结果页面显示“将此页面添加为书签并稍后返回以自动重新 ping”,因此我非常确定简单的 GET 请求就足够了,并且不涉及其他魔法。Seems quite easy at first sight. The form there is a plain HTML form with method=get and I don't see any XMLRPC code around. I'd say you just fill in the form once, click to submit and then copy the resulting URL from the address bar into a PHP
http_get()
orfopen()
. The result page says "Bookmark this page and come back to it later to automatically re-ping", so I'm pretty sure a plain GET request is enough and there is no other magic involved.