i had a question on how to pull certain content from a website using PHP and cURL and dislay it on a page? So far from the web, this is all i was able to find out, but this just saves the coding into a text document. Lets use php.net. Say i want to grab the information from the <div id="releaseBox"> which the latest release date on the right, and just diplay it. Like if it was 5.3.3 and i refreshed my paged, then it said 5.3.4 because they updated the release version. I really hope im making sense. Thanks for the help.
<?php $ch = curl_init("http://www.example.com/"); $fp = fopen("example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?>
Edited by fobos: n/a