Mailinglisten-Archive |
> ich hatte diese Funktion schon einmal gepostet.
> http://lala.d2g.com/includes/inc.gethrefs.php.txt
Bei mir klappte das nicht. Deshalb eine kleine Anpassung:
function gethrefs($source, $sep="'"){
//ws
$file = _(at)_file($source);
if($file){
$q1 = join('',$file);
$i = 1;
$hrefs = array();
$q1 = eregi_replace('href', 'HREF', $q1);
//ws
$q2 = explode("HREF=$sep",$q1);
//ws
while($i < count($q2)){
$q3 = explode($sep,$q2[$i]);
//ws
$h1 = explode("/",$source);
$h2 = $h1[count($h1) - 1];
$h3 = (strlen($source) - strlen($h2));
$host = substr($source,0,$h3);
if(substr($q3[0],0,7) != "http://"){
$q3[0] = $host.$q3[0];
}
$hrefs[$i] = $q3[0];
$i++;
}
return $hrefs;
}
}
--
Herzlich
Werner Stuerenburg
_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de
php::bar PHP Wiki - Listenarchive