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 Link to comment https://forums.phpfreaks.com/topic/156689-php-regex-grabbing-sites-info-thanks-in-advanced/ 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. Link to comment https://forums.phpfreaks.com/topic/156689-php-regex-grabbing-sites-info-thanks-in-advanced/#findComment-825119 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. Link to comment https://forums.phpfreaks.com/topic/156689-php-regex-grabbing-sites-info-thanks-in-advanced/#findComment-825123 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. Link to comment https://forums.phpfreaks.com/topic/156689-php-regex-grabbing-sites-info-thanks-in-advanced/#findComment-825131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.