Scholieren.com forum

Scholieren.com forum (https://forum.scholieren.com/index.php)
-   Software & Hardware (https://forum.scholieren.com/forumdisplay.php?f=20)
-   -   [PHP] Offsite gegevens uitlezen (https://forum.scholieren.com/showthread.php?t=1232926)

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($fp4096));
    
$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?

Manuzhai 22-07-2005 15:09

Dan gebruik je een HTTPClient class.

Ulfheðin 22-07-2005 16:14

Citaat:

Manuzhai schreef op 22-07-2005 @ 16:09 :
Dan gebruik je een HTTPClient class.
Eh, bedankt. :)


Alle tijden zijn GMT +1. Het is nu 07:38.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.