Testing for valid URL before writing HTML code (cgi) 
Author Message
 Testing for valid URL before writing HTML code (cgi)

: The images reside on a different web server than the cgi-script.

: What I'd like my cgi script to be able to do is to check that the file exists,
: somehow, and if it doesn't, try back another day, or two, until it finds a
: valid file.

: If my script was on the same server as the images, it would be much easier
: (just file open error code stuff).  But since the files are on another web
: server, I have no idea how to proceed.

: Can a perl script establish http connections and get back error codes?  How?

The answer is definitely yes.  There are many ways to do it, but in your
case it's almost certain that the best way will be to use the LWP::Simple
module, available at finer CPAN sites near you.



Fri, 24 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Perl code to test for valid reg-exp?

2. CGI module support for HTML-valid URIs

3. script to access a url and parse the html source code

4. Perl Source Code onto Own (W98) computer for writing/testing

5. testing PERL CGI w/o URL

6. Best way to determine if URL is valid

7. Checking if a url is valid

8. How do I check for a valid URL

9. Checking if URL is valid/exist using PERL

10. valid URL regexp

11. Failed to execute script '/cgi-bin/test.pl': Win32 Error Code = 87

12. an on-line personality test written in cgi http://www.psychometrics.co.uk

 

 
Powered by phpBB® Forum Software