hey all, so ive gotten myself into a place i dont understand, the land of regular expressions. so far ive used curl to get a remote page and store it as a string in a variable, and now i want to use preg_split() to break the whole page variable up into just the links and none of the html or other code.
<?
// cURL Stuff
$url = "http://www.somesite.com/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url); // set url
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4s
$result = curl_exec($ch); // run the whole process
curl_close($ch);
// now here is where i have no idea what im doing. i did this just to see what would happen and all it retruns is "Array"
$stuff = preg_split("//", "$result");;
echo $stuff;
?>