471,091 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,091 software developers and data experts.

Get the full path of an image

Is it possible to retrieve the local full path of an image ( not the url )?
Jul 23 '05 #1
3 7526
VK
no
Jul 23 '05 #2
"Bill Brother" <bi********@iname.com> wrote in message
news:41***********************@news.wanadoo.fr...
Is it possible to retrieve the local full path of an image ( not the

url )?

You say "local full path" -- is the image on your local file system?
Or do you mean "remote full path" -- for example:

http://www.{domain}/{folder}/{subfolder}/image.gif

might resolve to:

d:\inetpub\wwwroot\www\user23\{folder}\{subfolder} \image.gif
Jul 23 '05 #3
Bill Brother wrote:
Is it possible to retrieve the local full path of an image ( not the url )?


You should be able to get the location and the image src string and
work it out from there (allowing for relative paths like
../../images/image.gif and root paths like /images/image.gif)

You would also have to look for a path meta tag (can't remember the
name of it right now...)

A bit of regular expression matching and string concatenation should do
the trick, however it isn't reliable as the src string may be parsed by
the server and return something totally different. There is nothing
that guarantees that the image src actually points to an image.
--
Rob
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Yang | last post: by
2 posts views Thread by Nathan Sokalski | last post: by
6 posts views Thread by David W. Simmonds | last post: by
11 posts views Thread by rh00667 | last post: by
11 posts views Thread by cybervigilante | last post: by
2 posts views Thread by =?Utf-8?B?U2hhbQ==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.