GodOfWar Posted May 22, 2007 Share Posted May 22, 2007 Hi all I need help with building a PHP script. The porpoise of the script is to cat data from HTML log page. The result of the data retrieving from the HTML page, I need to troy to MYSQL. I do not know where to start and I will be very happy if you could help me. Thank you very, very much, for any help . This is an example of the data on the HTML, second column is the filed that is needed. Name Windows XP (Professional) Service Pack 2 Activation Status Activated Checked Build No Boot Device \Device\HarddiskVolume1 System Device \Device\HarddiskVolume2 Quote Link to comment https://forums.phpfreaks.com/topic/52518-cat-data-from-html-page-with-php/ Share on other sites More sharing options...
GodOfWar Posted May 23, 2007 Author Share Posted May 23, 2007 Still need help. My problem is that i want to get the data that the HTML page show and not the is code. I can get the log file in XML extension dos this can help me ? Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/52518-cat-data-from-html-page-with-php/#findComment-259820 Share on other sites More sharing options...
taith Posted May 23, 2007 Share Posted May 23, 2007 $file=file_get_contents('yourhtmlfile.html'); #get the contets of the html file $file=str_replace(" ", "^", $file); #to take care of the " "(2) in the file... while ignoring the " "(1) while(strpos($file,'^^')) $file=str_replace("^^", "^", $file); #to cleanup the ^^ --> ^ $content=explode('^',$file); echo $content[1]; Quote Link to comment https://forums.phpfreaks.com/topic/52518-cat-data-from-html-page-with-php/#findComment-259829 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.