HTML-Code in Variable speichern

casbar

Cadet 4th Year
Registriert
Dez. 2004
Beiträge
115
HALLO!
Brauche super dringend ein Trick um bei php den html code einer anderen Seite anzuzeigen bzw in eine Variable zu speichern!

bsp:

$code = get_html("http://www.google.de");
natürlich gibts die funktion get_html() nicht...

DANKE!!
casbar
 
PHP:
function get_html($url) {
    $allow_url_fopen = ini_get('allow_url_fopen');
    if(!$allow_url_fopen || strtolower($allow_url_fopen) == 'off') {
        exit("allow_url_fopen is not on");
    }
    $html = file_get_contents($url);
    return $html;
}
 
Zurück
Oben