Re: extracting http addresses




"anton-io!" <submit@xxxxxxxxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:9D4%e.283252$tt5.88413@xxxxxxxxxxx
>I would like to extract 3 urls from text entered in to a text box:
>
> sample input text example:
>
> <a href="http://www.something123.com/click?id=1234&type=2&subid=0"; >
> <IMG border=0 src="http://www.something123.com/images/001001001.JPG"; ></a>
> <IMG border=0 width="1" height="1"
> src="http://www.something123.com/show?id=HY&type=2&subid=03"; >
>
> desired output with 'http' :
>
> http://www.something123.com/click?id=1234&type=2&subid=0
> http://www.something123.com/images/001001001.JPG
> http://www.something123.com/show?id=HY&type=2&subid=03
>
>
>

Well you can search for the first appearence of "http" and search from there
to the first occurance of ' or " which mark the end of the link. I guess
you know which functions you should use or else check
http://nl3.php.net/manual/en/ref.strings.php

Hope it helps

Sander Swuste


.



Relevant Pages

  • Re: Compression
    ... Jason ... > I have a zip file that is downloaded onto the users HDD via http. ... there a way I could extract the files in the zip to a directory without the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: File write time
    ... The file transfer application being used is a http get. ... from java program or a C program. ... Is it possible to extract the time (for first byte written and last ...
    (comp.unix.programmer)
  • tcpdump show requested web addresses
    ... How to use tcpdump to extract addresses of web sites that users ... i.e. the HTTP GET requests? ...
    (comp.os.linux.networking)