Hi,
I talked to you on ICQ and told you to send an email with my PHP problem. So here it
is.
Someone is submitting an URL.
The problem is that someone is submitting the URL per form. So it is allways something
like http:\\www.mydomain.com\1.htm
In that case it is difficult to tell where to look, because the submitted URL is
ending with htm.
I would like to know the filesizes of the jpg's in the URL, so I'm talking about
matches 1 en 3. This is the script I got so far:
<?
$fp=fopen('http://www.mydomain.com/1.htm','r');
$text=fread($fp,100000);
fclose($fp);
$preg='/
<a
[^>]*
href=
"?\'?
([^"\'>]*\.jpg)
[^>]*
>
([^<]|<(?!a))*
<img
[^>]*
src=
"?\'?
([^"\'>]*\.jpg)
[^>]*
>
([^<]|<(?!a))*
<\/a
/siUx';
preg_match_all($preg,$text,$matches);
for ($k=0;$k<count($matches[0]);$k++){
echo $matches[3][$k].' links to '.$matches[1][$k].'<br>';
}
?>