Stotty Posted May 3, 2009 Share Posted May 3, 2009 Hello PhpFreaks (: Im making a website that needs to grab news from another website " runescape.com " The div i need to grab is <div class="newsTitle"> And i got told to get this code <?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); ?> I was just wondering what i need to change to get it to grab that data (: Thanks in Advanced Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 If you're using cURL, why do you have fopen? Edit: I don't think this will be a Regex problem. Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted May 3, 2009 Share Posted May 3, 2009 I invite you to view the rules. Make note of rule #10 (rules are being amended, so keep an eye out for them). This silliness of urgency and impatience is not condoned here. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 3, 2009 Share Posted May 3, 2009 As nrg_alpha mentioned, please do not bump your topic so quickly. I've removed the excess amount of posts you've created. Quote Link to comment 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.