SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check status on XML_RPC2 server.

    Is it possible, through PHP, to check if ones XML_RPC2 server is responding?
    http://pear.php.net/package/XML_RPC2

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Not sure if this is exactly what you mean, but I use cURL to check the status code returned by server.
    PHP Code:

    // usual cURL stuff, where $ch is a curl object, then

        
    $info curl_getinfo($ch);
        
    curl_close($ch); // close cURL handler 
        
    if (empty($info['http_code'])) {
          die(
    "No HTTP code was returned");
        } else {
    //do stuff, process the request

    That seems to be the cheapest way (in terms of bytes returned).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •