GIDForums

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Mar-2008, 07:45
Richardknox Richardknox is offline
Junior Member
 
Join Date: Nov 2006
Location: Michigan
Posts: 82
Richardknox is on a distinguished road

HTTP 404 Not found


Greetings,

On my site, I link to other sites webcams, but sometimes those cams are down for what ever reason, and it returns a 404 error back to the window that is displaying the cam. Right now I just go in and modify a field in the database to display a static image for that webcam, but I have to know that its down.

I need something to automatically recognise that there is a 404 error and display the static image instead. Any suggestion of bits of code will help



Thanks,
Richard
  #2  
Old 08-Mar-2008, 17:59
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 726
admin will become famous soon enough

Re: HTTP 404 Not found


You may want to write a script, run it as a cron job perhaps, that will send a request to the web site(s) at least once a day. Parse the response for the STATUS and log the results to a file.

To send a request, you can use the PHP function fsockopen. Look at the example code in this web page to get an idea: www.gidnetwork.com/b-54.html. Although I use the GET method -- to request the page -- you may use HEAD instead.
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
 

Recent GIDBlogGoing to Iraq by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
http request Problem using tomcat - axis & BCB Mario CPP / C++ Forum 0 01-Nov-2007 01:53
Major newbie problem cynack MS Visual C++ / MFC Forum 1 08-Apr-2007 11:25
What (or who) is Mediapartners-Google/2.1? JdS Advertising & Affiliates Forum 3 21-Feb-2007 03:24
issues compiling .h and .cpp files with Dev C++ iceman2006 CPP / C++ Forum 9 17-May-2006 19:32
Dummie needs help - URL not found Lrosewitz Apache Web Server Forum 1 28-May-2004 14:32

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 12:38.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.