Pinging with PHP

Discussion in 'PHP' started by klown, Apr 4, 2007.

  1. #1
    I have a system that will update a rss feed sometimes. When the rss feed is updated I want my php code to ping a list sites. I can't seem to find the code for this though, just a bunch of manual sites.

    Any help is greatly appreciated.
     
    klown, Apr 4, 2007 IP
  2. degy

    degy Peon

    Messages:
    145
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    degy, Apr 5, 2007 IP
  3. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't think thats how you ping website feeds.. those scripts all use a system command.
     
    klown, Apr 5, 2007 IP
  4. tinkerbox

    tinkerbox Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    tinkerbox, Apr 5, 2007 IP
  5. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    http://www.xmlrpc.com/

    This site may fill you in on some of the background.

    Alternatively you could just use curl to automate the form submission at one of the manual services.
     
    streety, Apr 5, 2007 IP
  6. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Can you send me a link to some info on how to use that command to ping? I cant seem to find it and I don't know much about the unix command line.
     
    klown, Apr 9, 2007 IP
  7. jitesh

    jitesh Peon

    Messages:
    81
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    function url_exists($url)
    {
    $result = parse_url($url);
    if(isset($result['host'])) {
    $cmdResult = gethostbynamel($result['host']);

    if($cmdResult) {
    return true;
    } else {
    return false;
    }
    } else {
    return false;
    }
    }
     
    jitesh, Apr 9, 2007 IP
  8. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'm talking about a ping to tell sites that my blog has updated, i'm not sure if the above function is that kind of ping?
     
    klown, Apr 9, 2007 IP
  9. streety

    streety Peon

    Messages:
    321
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't think that function is what you're looking for. A ping has different meanings in blogging and networking. That's the networking ping.

    A blogging ping is sent via xmlrpc. Basically it is just an automated way to submit a form to a website. For more about xmlrpc follow the link in my previous post.

    Different services will implement things slightly differently but to get you started

    http://www.weblogs.com/api.html
    http://blogs.feedburner.com/feedburner/archives/000478.html
    http://www.syndic8.com/web_services/
     
    streety, Apr 10, 2007 IP