Determine IMG src full path |
Determine IMG src full path |
brian07 |
Oct 25 2007, 04:10 PM
Post
#1
|
Group: Members Posts: 2 Joined: 25-October 07 Member No.: 4,151 |
In the following code:
<A href="http://members.cars.com/view_image.php?galid=26&num=0&style=html§ion=4&ss=5">On</A> / Off </SPAN><BR class=clear><BR class=clear><IMG src="ferrari pic_files/MVC-563S.JPG" What would be the complete URL filename for the picture? I tried http://members.cars.com/ferrari%20pic_files/MVC-563S.JPG and it failed. Perhaps the space after ferrari is messing things up... (Actual site name at issue not shown) |
pandy |
Oct 25 2007, 04:34 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
That depends on the URL to the HTML page the picture is in. See if this helps.
http://htmlhelp.com/faq/html/basics.html#relative-url Spaces in file names are ugly but allowed. But you should url encode it with %20 in the link, just as your browser has dome for you in the last URL you posted. It's both neater and easier to avoid spaces. |
brian07 |
Oct 25 2007, 08:16 PM
Post
#3
|
Group: Members Posts: 2 Joined: 25-October 07 Member No.: 4,151 |
Thanks for your reply. I've resolved my dilemma by simply using the .php url for the picture to download it even though it lacks a common picture extension anywhere in the url. At first I didn't think of trying because it looked too ugly to actually represent a .jpg.
|
Brian Chandler |
Oct 25 2007, 11:09 PM
Post
#4
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
Thanks for your reply. I've resolved my dilemma by simply using the .php url for the picture to download it even though it lacks a common picture extension anywhere in the url. At first I didn't think of trying because it looked too ugly to actually represent a .jpg. The "file extension" doesn't necessarily have anything to do with the file type: if a php program (called something.php) delivers an image, then that php program is the address of the image. It should send the appropriate header giving the type of the file (e.g. jpg image), and this is what the browser should rely on. (But there's always Microsoft to mess things up: iirc one of their security holes was that sending a file called "fish.exe" with a file type of jpeg neatly got it past their "security" check, but then the operating system ran it anyway. Something like that.) |
pandy |
Oct 26 2007, 02:16 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
The why would it say .jpg in the image tag?
QUOTE IMG src="ferrari pic_files/MVC-563S.JPG I assume the page you refer to works and the image shows up? |
Brian Chandler |
Oct 26 2007, 03:15 AM
Post
#6
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
The why would it say .jpg in the image tag? QUOTE IMG src="ferrari pic_files/MVC-563S.JPG I assume the page you refer to works and the image shows up? I'm not sure which question you're replying to, but I think the OP's uncertainty was about the following URL: http://members.cars.com/view_image.php?gal...tion=4&ss=5 (Which appears to be fake - "Firefox can't find the server at members.cars.com.") But I think this is supposed to be the URL of an image - and my point is that it may well be, even though there is no "jpg" or similar anywhere in it. For example, the following is the URL of a jpg image: http://imaginatorium.org/graphics/iromap.php?x=172&y=77 And so are all the other possibilities with different x and y values (0-255, iirc) for the cross-hair position. |
pandy |
Oct 26 2007, 03:23 AM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
As I understand it, he whats to know the full URL to the image in the HTML snip he provides.
QUOTE In the following code: <snip> What would be the complete URL filename for the picture? |
Brian Chandler |
Oct 26 2007, 03:38 AM
Post
#8
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
As I understand it, he whats to know the full URL to the image in the HTML snip he provides. QUOTE In the following code: <snip> What would be the complete URL filename for the picture? Yes, I understand that that was your initial understanding of what he was asking (i.e. how to find the full URL for "ferrari pic_files/MVC-563S.JPG") and as you correctly pointed out, we can't say, unless we know the address of the path on which this appears. But then the OP said: "Thanks for your reply. I've resolved my dilemma by simply using the .php url for the picture to download it even though it lacks a common picture extension anywhere in the url. At first I didn't think of trying because it looked too ugly to actually represent a .jpg." This to me suggests that the OP wants to know if and how the long tedious URL with .php in the middle can be an image. Which is what I was trying to answer. But of course I can only point out that it *could* be an image URL - we can't know what it *actually* is without accessing it, or getting a clarification from the OP. If it is an image, then the point is that the HTML snip includes *two* image references, so it's easy for any of us to answer the wrong question. |
pandy |
Oct 26 2007, 06:41 AM
Post
#9
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
Oh, I see! He's asking about the image the link (perhaps) leads to, not the image on the page. I was totally focused on the IMG tag.
|
Lo-Fi Version | Time is now: 26th April 2024 - 08:53 PM |