The website daily horoscope script has stopped working because of a change in the url of yahoo horoscopes.
if you have the daily horoscopes on your site contact me for the fix.
Paul
<?
$sign = $_GET['sign'];
$date = $_GET['date'];
?>
<!--<center><a href="index.php"><img src="images/imagesheader1.gif" width="350" height="42" border="0" alt=""></a></center>-->
<br><br>
<?
if(!$date && !$sign){
?>
<div class='headline' style='text-align: center;'>Daily horoscope. Choose your sign.<br><br></div>
<table align="center" border="0" width="200" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=aquarius">
<IMG SRC="images/icon_zodiac_aquarius.gif" BORDER="0" ALT="Aquarius">
Aquarius</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=libra">
<IMG SRC="images/icon_zodiac_libra.gif" BORDER="0" ALT="Libra">
Libra</A></td>
</tr>
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=aries">
<IMG SRC="images/icon_zodiac_aries.gif" BORDER="0" ALT="Aries">
Aries</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=pisces">
<IMG SRC="images/icon_zodiac_pisces.gif" BORDER="0" ALT="Pisces">
Pisces</A></td>
</tr>
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=cancer">
<IMG SRC="images/icon_zodiac_cancer.gif" BORDER="0" ALT="Cancer">
Cancer</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=sagittarius">
<IMG SRC="images/icon_zodiac_sagittarius.gif" BORDER="0" ALT="Sagittarius">
Sagittarius</A></td>
</tr>
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=capricorn">
<IMG SRC="images/icon_zodiac_capricorn.gif" BORDER="0" ALT="Capricorn">
Capricorn</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=scorpio">
<IMG SRC="images/icon_zodiac_scorpio.gif" BORDER="0" ALT="Scorpio">
Scorpio</A></td>
</tr>
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=gemini">
<IMG SRC="images/icon_zodiac_gemini.gif" BORDER="0" ALT="Gemini">
Gemini</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=taurus">
<IMG SRC="images/icon_zodiac_taurus.gif" BORDER="0" ALT="Taurus">
Taurus</A></td>
</tr>
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=leo">
<IMG SRC="images/icon_zodiac_leo.gif" BORDER="0" ALT="Leo">
Leo</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=virgo">
<IMG SRC="images/icon_zodiac_virgo.gif" BORDER="0" ALT="Virgo">
Virgo</A></td>
</tr>
</table><div class='headline' style='text-align: center;'><br />
Copy Paste Link Below To Send Free Horoscope To Friends:<br />
<input type="text" size="70" value="<?php print $root_host."index.php?page=horoscope";?>" onMouseOver="this.focus();this.select()"onClick="this.focus();this.select()">
<br><br />
</p>
<p align="center">Copy Paste Below To Add Free Horoscope To Your Myspace:<br />
<input type="text" size="70" value="<?php print "<a href='".$root_host."index.php?page=horoscope'>".$site_title." Free Daily Horoscope Click Here</a>";?>" onMouseOver="this.focus();this.select()"onClick="this.focus();this.select()">
<br><br /></div>
<?
}
else{
if(!$date){
$date = date("Ymd");
}
?>
<table align="center" border="0" width="400"cellspacing="0" cellpadding="5">
<tr>
<td>
<table align="center" border="0" width="100%"cellspacing="0" cellpadding="5">
<tr>
<td width="100">
<a href="index.php?page=horoscope&sign=aquarius&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_aquarius.gif" BORDER="0" ALT="Aquarius">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=aries&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_aries.gif" BORDER="0" ALT="Aries">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=cancer&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_cancer.gif" BORDER="0" ALT="Cancer">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=capricorn&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_capricorn.gif" BORDER="0" ALT="Capricorn">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=gemini&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_gemini.gif" BORDER="0" ALT="Gemini">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=leo&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_leo.gif" BORDER="0" ALT="Leo">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=libra&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_libra.gif" BORDER="0" ALT="Libra">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=pisces&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_pisces.gif" BORDER="0" ALT="Pisces">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=sagittarius&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_sagittarius.gif" BORDER="0" ALT="Sagittarius">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=taurus&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_taurus.gif" BORDER="0" ALT="Taurus">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=scorpio&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_scorpio.gif" BORDER="0" ALT="Scorpio">
</A></td>
<td width="100">
<a href="index.php?page=horoscope&sign=virgo&date=<? echo $date ?>">
<IMG SRC="images/icon_zodiac_virgo.gif" BORDER="0" ALT="Virgo">
</A></td>
</tr>
</table>
<br><center><b><font face="arial"><? echo ucwords($sign) ?></font></b><br><br>
<a href="index.php">Reset</a>
<?
if($date > (date("Ymd")-1)){
?>
<a href="index.php?page=horoscope&sign=<? echo $sign ?>&date=<? echo (date("Ymd")-1) ?>">Yesterday</a>
<?
}
else{
echo '<b><font size="2">Yesterday</font></b> ';
}
if($date != (date("Ymd"))){
?>
<a href="index.php?page=horoscope&sign=<? echo $sign ?>">Today</a>
<?
}
else{
echo '<b><font size="2">Today</font></b> ';
}
if($date < (date("Ymd")+1)){
?>
<a href="index.php?page=horoscope&sign=<? echo $sign ?>&date=<? echo (date("Ymd")+1) ?>">Tomorrow</a>
<?
}
else{
echo '<b><font size="2">Tomorrow</font></b> ';
}
?>
<!--<a href="http://astrology.yahoo.com/astrology/general/dailyextended/<? echo $sign ?>/<? echo $date ?>" target="_blank">Source</a>--></center>
<table width="100%" align="center">
<tr>
<td>
<?
//$url="http://astrology.yahoo.com/astrology/general/dailyextended/$sign/$date";
$url="http://shine.yahoo.com/astrology/$sign/daily-overview/$date";
preg_match("/^(https?:\/\/)?([^\/]*)(.*)/i", "$url", $matches);
$domain = "http://" . $matches[2];
$page = $matches[3];
$code = file_get_contents($domain.$page);
//$start= strpos($code, "<table width=\"90%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
//$finish= strpos($code, "<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\">");
$start= strpos($code, "<h3>Overview</h3>");
$start=$start+17;
$finish= strpos($code, "<div class=\"ft\">");
$length= $finish-$start;
$code=substr($code, $start, $length);
$newcode = preg_replace("/(href=\"?)(\/[^\"\/]+)/", "\\1" . $domain . "\\2", $code);
echo "<br>".$newcode;
?>
</td></tr>
</table>
</td>
</tr>
</table>
<div class='headline' style='text-align: center;'><br />
Copy Paste Link Below To Send Free Horoscope To Friends:<br />
<input type="text" size="70" value="<?php print $root_host."index.php?page=horoscope";?>" onMouseOver="this.focus();this.select()"onClick="this.focus();this.select()">
<br><br />
</p>
<p align="center">Copy Paste Below To Add Free Horoscope To Your Myspace:<br />
<input type="text" size="70" value="<?php print "<a href='".$root_host."index.php?page=horoscope'>".$site_title." Free Daily Horoscope Click Here</a>";?>" onMouseOver="this.focus();this.select()"onClick="this.focus();this.select()">
<br><br /></div>
<div align="center"><a href="http://www.webscribble-webdate-support.com">Source</a></div>
<?
}
?>
<tr>
<td><img src="images/bullet.gif" width="13" height="13" border="0"></td>
<td><a href="index.php?page=horoscope" class="w">Daily Horoscope</a></td>
</tr> <a href="index.php?page=horoscope" class="m">My Horoscope</a> |Return to PHP Script Support Forum
Users browsing this forum: No registered users and 0 guests