Closed Thread
Results 1 to 2 of 2

Thread: Check if a URL Exists

  1. #1
    Chan is offline Programming Professional
    Join Date
    Jun 2006
    Posts
    205
    Rep Power
    0

    Check if a URL Exists

    I can't find a working function which will allow me to check if a url exists?


    Can anyone provide me with one? Or help me create one?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Crane's Avatar
    Crane is offline Programming Expert
    Join Date
    Nov 2005
    Posts
    398
    Rep Power
    25
    You could always just use simple code like:

    Code:
    $content fopen($url);
    if (
    $content) {}
    else {
      
    // URL Does not exist

    Or you could make a connection to port 80 and see if the connection rejects or not.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check if multiple remote files exists HELP! (Using curl)
    By SeanStar in forum PHP Development
    Replies: 7
    Last Post: 12-17-2010, 09:06 AM
  2. Linux/Bash: Check if a file exists
    By Tor in forum Bash / Shell Scripting
    Replies: 4
    Last Post: 07-10-2009, 11:28 AM
  3. Check if a file exists?
    By Lop in forum Pascal and Delphi
    Replies: 3
    Last Post: 01-06-2007, 10:54 PM
  4. Check if a file exists
    By Lop in forum C and C++
    Replies: 4
    Last Post: 08-07-2006, 08:03 PM
  5. Check if a File Exists
    By NeedHelp in forum C# Programming
    Replies: 4
    Last Post: 08-07-2006, 03:20 PM

Tags for this Thread

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