Forum Moderators: coopster & phranque

Message Too Old, No Replies

Image Script

Retrieving Images

         

shaw

8:39 pm on Jan 29, 2007 (gmt 0)

10+ Year Member


Hi,

I need script that will retrieve thumb images and place them next to the links.
This is just an example <scr http://www.mysite.com/image.cgi?&url=<url>.jpg>
but if it’s look familiar, than that is because it model based on old Alexa script.

I can call images directly using /thumbs/<url> but my problem, they saved as
domain.tld.jpg and <url> call them with ‘http://’ and of course that create mismatch.

So, what I need is a script that will strip http:// and retrieve image file only.

Is anyone know where can I find script like that or help me with creation of one?

Thanks in advance.

Martin40

10:04 pm on Feb 6, 2007 (gmt 0)

10+ Year Member



To remove http:// from the url (called $url), use:

my @newUrl = split('//', $url);

$newUrl[1] is the url without [....]