ok.. im back.. this is what ive got..
<?php
// site that has the forum
$site = curl_init("http://www.somesitewithaforum.com/forums/");
// file to hold the fourm index source
$temp = fopen("forum.txt", "w+");
// curl geting the page
curl_setopt($site, CURLOPT_FILE, $fp);
curl_setopt($site, CURLOPT_HEADER, 0);
curl_exec($site);
curl_close($site);
//close the source page
fclose($temp);
// read the source
$source = "$temp";
$sourcefile = fopen($source, 'w+');
$thedata = fread($sourcefile, filesize($source));
fclose($source);
// find how many post are in the fourms by doing preg_match()
// against the source file to get the line that has the post and threads info
if (preg_match('/Threads: (\d+), Posts: (\d+), Members: (\d+)/', "$thedata", "$matches") {
$threads = "$matches[1]";
$posts = "$matches[2]";
$members = "$matches[3]";
}
// show me the money!
print_r($matches);
?>
what i get is..
Fatal error: Only variables can be passed by reference in forum.php on line 24
help appreciated.. thanks!