greenba Posted January 31, 2007 Share Posted January 31, 2007 Hi,I have the following HTML code:[code]<html>.....<-- start -->I need this text<-- end -->...</html>[/code]How can I read the entire page, and just take the piece "I need this text" ?thanx Link to comment https://forums.phpfreaks.com/topic/36429-read-html-code/ Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 If it's a file, use file_get_contents() to get the entire contents as a string, then use strpos to find where <-- start --> and <-- end --> are, then use substr();You could also use regular expressions. Link to comment https://forums.phpfreaks.com/topic/36429-read-html-code/#findComment-173351 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.