A little modified code of the cronjob that parses the horoscopes i made it so u can have a function gethoroscope(signname)
If u want u can replace your gethoroscopes.php with that and itll work fine.
PHP Code:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}
// ########################################################################
// ######################### START MAIN SCRIPT AND WRITE TO TXT ###########
// ########################################################################
$signs = array("aries","Taurus","gemini","cancer","leo","virgo","libra","scorpio","sagi","capricorn","aquarius","pisces");
function gethoroscope($sign) {
$url = "http://www.tchatting.com/horoscopes/".$sign.".php";
@$string = implode("", file("$url"));
//$string = str_replace("\n","",$string);
$string = trim($string);
$filename = './dailyhoroscopes/'.$sign.'.txt';
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'w+')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $string) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($string) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
}
for($i=0;$i<12;$i++) {
gethoroscope($signs[$i]);
}
?>