diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d97a03..d6d5dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +## [6.0.8] - 2018-04-18 +### Changed +- Switched everything to https. +- Updated `imdb.tests.php`. +- Added `getBudget()`. *Thanks, @bla0r!* + ## [6.0.7] - 2017-12-25 ### Changed - Updated the title regex. @@ -69,3 +75,6 @@ All notable changes to this project will be documented in this file. [6.0.3]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.2...v6.0.3 [6.0.4]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.3...v6.0.4 [6.0.5]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.4...v6.0.5 +[6.0.6]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.5...v6.0.6 +[6.0.7]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.6...v6.0.7 +[6.0.8]: https://github.com/FabianBeiner/PHP-IMDB-Grabber/compare/v6.0.7...v6.0.8 diff --git a/examples/imdb.tests.php b/examples/imdb.tests.php index 84103cb..7264dfc 100644 --- a/examples/imdb.tests.php +++ b/examples/imdb.tests.php @@ -48,20 +48,20 @@ include_once '../imdb.class.php'; $aTests = [ - 'http://www.imdb.com/title/tt0033467/', - 'http://www.imdb.com/title/tt5680152/reference', + 'https://www.imdb.com/title/tt0033467/', + 'https://www.imdb.com/title/tt5680152/reference', 'http://www.imdb.com/title/tt0460681/', 'tt1124379', 'tt0187775 ', 'http://www.imdb.com/title/tt1231587/', - 'http://www.imdb.com/title/tt1392190/', + 'https://www.imdb.com/title/tt1392190/', 'http://www.imdb.com/title/tt0421974/', - 'http://www.imdb.com/title/tt0094618/', + 'https://www.imdb.com/title/tt0094618/', 'http://www.imdb.com/title/tt0448157/', 'Matrix', 'Donner Pass', 'If only', - 'http://www.imdb.com/title/tt1604113/', + 'https://www.imdb.com/title/tt1604113/', 'Wyse Guys', 'http://www.imdb.com/title/tt2005268/', 'Wer ist Clark Rockefeller?', @@ -70,7 +70,7 @@ 'One Tree Hill', 'Formosa Betrayed', 'New York, I Love You', - 'http://us.imdb.com/Title?0144117', + 'https://us.imdb.com/Title?0144117', 'http://www.imdb.com/title/tt1022603/', 'Fabian Beiner never made a movie. Yet!' ]; diff --git a/imdb.class.php b/imdb.class.php index a394e3d..71283bd 100644 --- a/imdb.class.php +++ b/imdb.class.php @@ -69,7 +69,7 @@ class IMDB const IMDB_TITLE = '~itemprop="name">(.*)(<\/h3>|iId = preg_replace('~[\D]~', '', $sId); - $this->sUrl = 'http://www.imdb.com/title/tt' . $this->iId . '/reference'; + $this->sUrl = 'https://www.imdb.com/title/tt' . $this->iId . '/reference'; $bSearch = false; } else { switch (strtolower($this->sSearchFor)) { @@ -199,7 +199,7 @@ private function fetchUrl($sSearch) $sParameters = '&s=tt'; } - $this->sUrl = 'http://www.imdb.com/find?q=' . str_replace(' ', '+', $sSearch) . $sParameters; + $this->sUrl = 'https://www.imdb.com/find?q=' . str_replace(' ', '+', $sSearch) . $sParameters; $bSearch = true; // Was this search already performed and cached? @@ -249,7 +249,7 @@ private function fetchUrl($sSearch) // Was the movie found? $sMatch = IMDBHelper::matchRegex($sSource, self::IMDB_SEARCH, 1); if (false !== $sMatch) { - $sUrl = 'http://www.imdb.com/title/' . $sMatch . '/reference'; + $sUrl = 'https://www.imdb.com/title/' . $sMatch . '/reference'; if (true === self::IMDB_DEBUG) { echo '
New redirect saved: ' . basename($sRedirectFile) . ' => ' . $sUrl . '
'; } @@ -516,7 +516,7 @@ public function getAkas() return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, self::$sNotFound, $aReturn); } else { - $fullAkas = sprintf('http://www.imdb.com/title/tt%s/releaseinfo', $this->iId); + $fullAkas = sprintf('https://www.imdb.com/title/tt%s/releaseinfo', $this->iId); $aCurlInfo = IMDBHelper::runCurl($fullAkas); $sSource = $aCurlInfo['contents']; @@ -612,7 +612,7 @@ public function getCastAsUrl($iLimit = 0, $bMore = true, $sTarget = '') break; } $aReturn[] = - 'isReady) { $aMatch = IMDBHelper::matchRegex($this->sSource, self::IMDB_COMPANY); if (isset($aMatch[2][0])) { - return ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - ' $sName) { $aReturn[] = - 'iId . '/episodes?season=' . $sName . @@ -1325,7 +1325,7 @@ public function getTrailerAsUrl($bEmbed = false) if (true === $this->isReady) { $sMatch = IMDBHelper::matchRegex($this->sSource, self::IMDB_TRAILER, 1); if (false !== $sMatch) { - $sUrl = 'http://www.imdb.com/video/imdb/' . $sMatch . '/' . ($bEmbed ? 'player' : ''); + $sUrl = 'https://www.imdb.com/video/imdb/' . $sMatch . '/' . ($bEmbed ? 'player' : ''); return IMDBHelper::cleanString($sUrl); } @@ -1389,7 +1389,7 @@ public function getWriterAsUrl($sTarget = '') if (count($aMatch[2])) { foreach ($aMatch[2] as $i => $sName) { $aReturn[] = - ' 'http://www.imdb.com', + CURLOPT_REFERER => 'https://www.imdb.com', CURLOPT_RETURNTRANSFER => 1, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0,