Jump to content

Php Regex Grabbing Sites Info | Thanks In Advanced


Stotty

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.