百度ping方法使用示例
这篇文章主要介绍了百度ping方法使用示例,可以把网站地址自动ping到百度,大家参考使用吧
使用方法访问的时候自动ping到百度,我的方法是生成缓存,更新缓存的时候自动ping百度,返回结果为0表示成功。 代码如下: $pingarcurl='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $arcping = new Ping('脚本之家',$pingarcurl,get_domain(),'http://www.jb51.net'); $arcping->pingbaidu(); 代码如下: class ping{ private$title;//博客名称 private$hosturl;//博客首页地址 private$arturl;//新发文章地址 private$rssurl;//博客rss地址 private$baiduXML;//百度XML结构 private$baiduRPC;//百度XML地址 publicfunction__construct($title,$arturl,$hosturl,$rssurl) { if(empty($title)||empty($arturl)) returnfalse; $this->title=$title; $this->hosturl=$hosturl; $this->rssurl=$rssurl; $this->arturl=$arturl; $this->baiduRPC='http://ping.baidu.com/ping/RPC2'; $this->baiduXML=''; $this->baiduXML.='
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version