By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,313 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,313 IT Pros & Developers. It's quick & easy.

Get the full path of an image

P: n/a
Is it possible to retrieve the local full path of an image ( not the url )?
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
VK
no
Jul 23 '05 #2

P: n/a
"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

P: n/a
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.