file exists on remote server ???

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 66348
interpreted = N
texte = WE have a real estate listings application. The database contains file names of pictures of the home on a remote server. For example the database field might contain "picture1.jpg".... we assemble a URL like http://www.domain.com/[picturename] and display the image on the web page. Sometimes, however, the file doesn't actually exist on the remote server (even though it is supposed to) and we end up with a broken picture link in the rendered web page. Is there a way to access the remote file via [tcpconnect] and then examine the headers. If the status code in the headers is anything but 200, we can serve up a place holder image. Let me rephrase that. I know that there is a way to do this. What I'm asking for is does anyone have a snippet of code they would lend me. Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ Webcatalog programming ~ Database design ------------------------------------------------------------- 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:

    
  1. file exists on remote server ??? ( Joe D'Andrea 2006)
WE have a real estate listings application. The database contains file names of pictures of the home on a remote server. For example the database field might contain "picture1.jpg".... we assemble a URL like http://www.domain.com/[picturename] and display the image on the web page. Sometimes, however, the file doesn't actually exist on the remote server (even though it is supposed to) and we end up with a broken picture link in the rendered web page. Is there a way to access the remote file via [tcpconnect] and then examine the headers. If the status code in the headers is anything but 200, we can serve up a place holder image. Let me rephrase that. I know that there is a way to do this. What I'm asking for is does anyone have a snippet of code they would lend me. Thanks, ~joe -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ Webcatalog programming ~ Database design ------------------------------------------------------------- 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/ Joe D'Andrea

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:

WebCat2b13MacPlugIn - [showif][search][/showif] (1997) [ShowNext] feature in 2.0 (1997) Purchased cart being overwritten - still !?? (1997) Variables not being passed *back* (2000) [append] problem (1997) carriage returns in data (1997) & not allowed in db by definition? (1999) New site announcement + Showing once on a founditems (1997) nested ListWords? (2003) Multiple Web Delivery Methods?? (1999) multiple selected Checkboxes (1998) Show next 2 examples that work (1997) SERIAL NUMBER PROBLEM *AGAIN*!!! (1998) [cart] Taxrate - seriously .. (2002) Recalculating Shipping Costs (1997) [writefile] (1997) About to give up (1998) [append] vs. [appendfile] delta + question? (1997) select multiple (1997) WebCatalog for guestbook ? (1997)