Ulfheðin |
22-07-2005 13:46 |
[php] Offsite gegevens uitlezen
Het gaat me af dmv
PHP-code:
<?php
$off_site = 'http://www.google.com/';
$start = '<title>';
$end = '<\/title>';=
$fp = fopen ($off_site, 'r') or die('Unable to open file '.$off_site.' for reading');
while (!feof ($fp))
{
$buf = trim(fgets($fp, 4096));
$cont .= $buf;
}
preg_match("/$start(.*)$end/s",$cont,$match);
echo 'de titel '.$off_site.' is <b>'.$match[1].'</b> 8)';
?>
of iets soortgelijks.
Maar wat nu als de inhoud van zo'n pagina afhankelijk is van post-waardes?
|