The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Determine IMG src full path
brian07
post 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&section=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)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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.


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
brian07
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 25 2007, 11:09 PM
Post #4


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(brian07 @ Oct 26 2007, 10:16 AM) *

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.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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? blink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 26 2007, 03:15 AM
Post #6


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(pandy @ Oct 26 2007, 04:16 PM) *

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? blink.gif


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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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. unsure.gif
QUOTE
In the following code:
<snip>
What would be the complete URL filename for the picture?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 26 2007, 03:38 AM
Post #8


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(pandy @ Oct 26 2007, 05:23 PM) *

As I understand it, he whats to know the full URL to the image in the HTML snip he provides. unsure.gif
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.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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. blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 08:53 PM