4
Okay guys don't laugh to hard when you see this.
Here are the changes to add multiple theaters:
functions.php Added this function: function setTableID($tableID)
{
$this->tableID = $tableID;
}
common.php For ever theater that shows up in my area I added one of these code blocks: // not changed
$a = new YahooMovieTimeRipper("http://movies.yahoo.com/showtimes/showtimes.html?z=23228&sim#T1");
// end not changed
// changed
// get the date, movie, and theater info
$datesT1 = $a->getDateInfo();
$moviesT1 = $a->getMovieInfo();
$theatersT1 = $a->getTheaterInfo();
$a->setTableID("T2");
$datesT2 = $a->getDateInfo();
$moviesT2 = $a->getMovieInfo();
$theatersT2 = $a->getTheaterInfo();
$a->setTableID("T3");
$datesT3 = $a->getDateInfo();
$moviesT3 = $a->getMovieInfo();
$theatersT3 = $a->getTheaterInfo();
...
mymovies.php For ever theater that shows up in my area I added one of these code blocks: Make sure you match the variable names up for each table that represents the theater. So if you want to display the nineth theater you need to make sure that all the variables have T9 on the end. Which should match the code(variables) that you added in the common.php file.
Title |
MPAA Rating |
Run Time |
Showings |
for($i=0; $i {
?>
// prevent putting links on when no url exists
if($moviesT1[$i]->URL != '')
{
?>
title;?> |
}
else
{
?>
title;?> |
}
?>
rating;?> |
runTime;?> |
showings;?> |
}
?>
Please if you can optimize this code in anyway I would appreciate it. This is my first time using php so all I can say is it works. Ugliest hack ever, but it works.