Get the full path of an image

M

McKirahan

Bill Brother said:
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
 
R

RobG

Bill said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top