PDA

View Full Version : absolute URL of remote images


3d.magic
02-16-2005, 09:58 AM
want a script will return the absolute URL of all images from a web page. the web page may be in asp, php, html or whatever (exclude macromedia flash files for now).
the file opening is ok, but the matching and absolute URL part is still a problem
Any "off the shelf" code please.

Horus Kol
02-16-2005, 10:40 AM
why do you want to link to other peoples pictures?

3d.magic
02-16-2005, 10:43 AM
http://members.lycos.co.uk/aduck2u/fishlist/index.php

link also help show when the remote page is down

3d.magic
02-17-2005, 11:47 AM
so, either it is too difficult or assistance is being refused. which is it?

Fou-Lu
02-17-2005, 06:53 PM
Why do you need a script for this? I mean, I'm assuming that you want to add these images to that page, and simply put you shouldn't really hotlink someone else's images. The better option would be to save the ones you want and to upload them to serve from your own host. If you want a script, you would need to look into regular expressions to drag out the image information that you require.

3d.magic
02-18-2005, 12:55 PM
so the moral code also seems to include "resort to moralizing when you cant do it".
strangely none of the owners of the sites already listed on the page have read this moral code.
What is more the site viewers definitely prefer banners and AS i HAVE POINTED OUT LINKING ALSO INDICATES SITES THAT ARE DOWN.
however I am now about 85% through with writing my own script, just have to deal with frameset sites.
And to comply with the moral code I shant post the script here.
sheesh is this a religious site.

Fou-Lu
02-18-2005, 03:02 PM
Wow. That was a fairly rude and unwarrented way to finish your posting.
Good luck in your scripting endeavors.

3d.magic
02-21-2005, 08:23 AM
so as I have seen the recommendation of uploading( i.e. breaching copyright) remote images to your own site and referencing the image in your own host, recommended elsewhere as well , I will pose the question.
How do you upload a remote image to your own site if you do NOT have the absolute image URL.( i.e. what I am asking for?)
(if you are going to get the URL manually through properties in Windows you may as well resize/modify the image manually as well.)
So it seems that all the rhetoric is just that, because no one has the code to give the absolute URL.

3d.magic
02-21-2005, 09:47 AM
what also is long overdue is a script that outputs the matching codes used in both eregi and in preg_match.
i.e. some sort of script where you type in a sample of what you want, tick a few check boxes and the script will return the correct matching codes that you can then insert into preg match and eregi.
what are computers for if you have to do all the hard work yourself.

3d.magic
02-23-2005, 09:32 AM
ok so we have cracked this baby and it is screaming.
the links below will help you to do your own but be aware that the src getter in the comments of preg_match_all needs modification as it will not give all images/links.
next project an email address getter . would post a new request for help but, am still trying to get the rotten eggs and tomatoes out of my hair and dont need a new assault. plus now I dont really need the help .
keep on working for microsoft without pay . bye.


links to preg_match and preg_match_all
http://za2.php.net/manual/en/function.preg-match.php
http://za2.php.net/manual/en/function.preg-match-all.php
links to perl syntax:
http://www.troubleshooters.com/codecorn/littperl/perlreg.htm
http://www.perl.com/doc/manual/html/pod/perlre.html
http://www.comp.leeds.ac.uk/Perl/matching.html
http://www.somacon.com/blog/page27.php

Kurashu
02-23-2005, 01:34 PM
Wow, you are an extremely rude one.

Edit: I decided to tell you a few things, in case you ever check this again.

One) Would you steal candy from a store? I would say no, so why steal bandwidth from sites?

Two) To upload an image to your site without the remote absolute path (Which, by the way, isn't what you want as that would be something like opt/web/site/root/www.site.com/www/imgs/site/banner.jpg and would be completely useless on your sever. =D), you would save the image to your computer, upload it to the site, and then BAM! It is there. From what your site looks like, it might be better to have an image uploader script.

Three) use fsocketopen to open a socket to the site and check if it is up or down. If you weren't so rude, we might have gotten to that.

Four) As for the food in your hair, you might want to try Suave, it is pretty good.

I don't want to seem like I am being rude, because I'm not, heavily sarcastic on some parts, but not rude. Next time, you might want to explain your issuse more clearly and not blow up when we ask a question or don't respond ASAP. I know how you can feel when you need someone to respond and time seems to crawl by, but insulting us isn't any way to get help any faster.

3d.magic
02-24-2005, 10:16 AM
nah, i wasnt rude before but now i will be rude.
<removed />