12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- require dirname(__FILE__).'/../../../inc/incutio/class.IXR_Library.php';
- class basicPing
- {
- var $name;
- var $url;
-
- function basicPing($name,$url)
- {
- $this->name = $name;
- $this->url = $url;
- $this->err = '';
- }
-
- function weblogPing($server='',$path='')
- {
- $path = trim($path);
-
- $client = new IXR_Client($server,$path);
- $client->timeout = 5;
- $client->useragent .= ' -- DotClear/'.DC_VERSION;
-
- $client->debug = false;
-
- $ret = $client->query('weblogUpdates.ping',$this->name,$this->url);
- $err = $client->getErrorMessage();
- unset($client);
-
- if ($ret !== false) {
- return true;
- } else {
- return $err;
- }
- }
- }
- ?>
|