![]() |
|
#1
|
|||
|
|||
HTTP 404 Not foundGreetings,
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
|
||||
|
||||
Re: HTTP 404 Not foundYou 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. |
Recent GIDBlog
Going to Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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