script.php?movie=Knowing
Source Code - Street Date: July 26, 2011
Source Code / Knowing - Street Date: July 26, 2011
Shows movies release dates (bluray)
As requested ( for irc bot ).
<?php
if(isset($_GET['movie'])) {
$pdata = $_GET['movie'];
} else {
die("");
}
if (strlen($pdata) < 5) { die("At least 5 letters in search."); }
$data = file_get_contents("http://bluray.highdefdigest.com/releasedates.html");
preg_match_all('/<li><b>.*<a href=\"http\:\/\/bluray\.highdefdigest\.com\/[0-9]+\/.*\.html\">.*<\/a>/', $data, $results);
foreach ($results[0] as $linkki) {
preg_match('/http\:\/\/bluray.highdefdigest\.com\/[0-9]+\/.*\.html/', $linkki, $linkit[]);
preg_match('/html\">.*<\/a>/', $linkki, $leffax);
$leffa = str_replace('html">', '', $leffax[0]);
$leffa = str_replace('</a>', '', $leffa);
$leffatx[] = trim($leffa);
}
$paskaa = "-1";
$f = "0";
$checkki = "0";
foreach ($leffatx as $movie) {
$insidecheck = "0";
$paskaa++;
if (preg_match("/^$pdata/i", $movie)) {
$neekeri[] = $movie;
$checkki++;
}
if ($checkki == "4") {
if ($_GET['all'] != "yes") {
die("To see more results, goto: script.php?all=yes&movie=$pdata\n");
}
}
if (preg_match("/^$pdata/i", $movie)) {
$datelinkki = $linkit[$paskaa][0];
$datedata = file_get_contents("$datelinkki");
preg_match_all('/Street Date.*/', $datedata, $dateresults);
if(isset($dateresults[0][0])) {
echo "$movie - ".$dateresults[0][0]."\n";
$f = "1";
$insidecheck = "1";
}
}
if ($insidecheck != "1") {
if (preg_match("/$pdata/i", $movie)) {
$datelinkki = $linkit[$paskaa][0];
$datedata = file_get_contents("$datelinkki");
preg_match_all('/Street Date.*/', $datedata, $dateresults);
if(isset($dateresults[0][0])) {
echo "$movie - ".$dateresults[0][0]."\n";
$f = "1";
}
}
}
}
if($f == "0") {
echo " ".$pdata." returned 0 hits.";
}
?>