...

View Full Version : Read html page to Variables



SlayerACC
10-17-2009, 08:51 PM
I am looking to find out how to open and read a html page into variables..

can this be done..?

and how?

Thanks. Slayer

powerfear
10-17-2009, 09:17 PM
i'm not quite sur what you are asking for but something like this,



<?php
$link = 'http://google.com';
$handle = fopen($link, "rb");
$contents = stream_get_contents($handle);
fclose($handle);
?>


$contents is now the variables

SlayerACC
10-17-2009, 09:43 PM
I am looking at reading a local html file.. and displaying certain contents of the file on screen or saving to a DB..

Thanks,

barkermn01
10-17-2009, 10:57 PM
I am looking at reading a local html file.. and displaying certain contents of the file on screen or saving to a DB..

Thanks,



ob_start();
include("your_file.html");
$content = ob_get_flush();



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum