Checking whether remote image exists?
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58709
interpreted = N
texte = I guess the subject says it all, I have a large number of images stored on an off-site (non-WebDNA) server, and I'd like my pages to check whether the image exists, and if it doesn't then display a generic image instead.Here's what I've come up with, as always, I'm sure there's an easier way to do it. :-)[text]ImageResult=[shell]CURL images.domain.com/images/[image].jpg][/shell][/text][showif [ImageResult]^Not Found][text]ImageCheck=failed[/text][/showif][if "[ImageCheck]" = "failed"][then]

[/then][else]

[/else][/if]This is running under v6/OSXAnyone doing anything similar?My knowledge of Unix is still a little sparse, is there a better command than CURL for this kind of thing?Mark.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I guess the subject says it all, I have a large number of images stored on an off-site (non-WebDNA) server, and I'd like my pages to check whether the image exists, and if it doesn't then display a generic image instead.Here's what I've come up with, as always, I'm sure there's an easier way to do it. :-)[text]ImageResult=[shell]CURL images.domain.com/images/[image].jpg][/shell][/text][showif [ImageResult]^Not Found][text]ImageCheck=failed[/text][/showif][if "[ImageCheck]" = "failed"][then]
[/then][else]
[/else][/if]This is running under v6/OSXAnyone doing anything similar?My knowledge of Unix is still a little sparse, is there a better command than CURL for this kind of thing?Mark.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Mark Derrick
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
re:check boxes (1997)
WCS Newbie question (1997)
problems with 2 tags (1997)
SEARCH DATE RANGE (2000)
Problem (1997)
displaying New products (Yikes! it's Fixed!) (1997)
info (1997)
taxTotal, grandTotal (1997)
Interpret twice? (1997)
Help needed! (1998)
Hiding HTML and breaking the page (1997)
Checking two required fields (1998)
SQL (2004)
MacAuthorize order data fields WAS:How To question... (1997)
How to append text after the sign & (1997)
platform of the server? (2000)
Multiple download orders of the same product? (1997)
[WebDNA] SMTP sendmail error (2015)
WC Database Format (1997)
Setting up WebCatalog with Retail Pro data (1996)