Forum Moderators: coopster

Message Too Old, No Replies

file get contents and div id(name)

         

Lolalola

7:08 am on Jun 15, 2010 (gmt 0)



Hi,
I know it is possible to get information (text) from another page with file_get_contents function.

For example, on the page at http://www.example.com/ is a div named news. How can I get the text from this div?

[edited by: coopster at 1:13 pm (utc) on Jun 15, 2010]
[edit reason] changed to example.com [/edit]

coopster

1:16 pm on Jun 15, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Once you have the text stored in the variable you can use regular expressions [php.net], the DOM functions [php.net], or perhaps even a combination of both. The tidy functions [php.net] may do the trick too.