SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict ibeblunt's Avatar
    Join Date
    Jan 2001
    Location
    Jersey City, NJ
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pinging Websites

    I'm looking for a way to ping a list of sites to ensure the URL's all work.

    Basically, the sites are in a MySQL table. I would run though all of the links and ping the url.

    Any ideas on how to do this?
    <///////~

    www.sohh.com

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use fopen().

  3. #3
    SitePoint Addict ibeblunt's Avatar
    Join Date
    Jan 2001
    Location
    Jersey City, NJ
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That appears to work, sort of.

    I did this:

    if (!($outFile = fopen("http://www.badurl.org","r"))) {

    echo "Bad Link";

    }

    It works, but I get this right before the echo:

    Warning: fopen("http://www.badurl.org","r") - Bad file descriptor in /usr/local/www/docs/sohh.com/search/admin/index.php on line 916

    Does anyone know how to suppress the error message?
    <///////~

    www.sohh.com

  4. #4
    SitePoint Addict ibeblunt's Avatar
    Join Date
    Jan 2001
    Location
    Jersey City, NJ
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I figured out how to suppress the error message.

    Nothing like a PHP Book handy.

    For those who wanna know:

    Place an @ in front of the function.
    <///////~

    www.sohh.com


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
  •