FabianBeiner / PHP-IMDB-Grabber

This PHP library enables you to scrape data from IMDB.com.
MIT License
271 stars 160 forks source link

IMDB URL Fetching data N/A #174

Closed gigahertz closed 2 years ago

gigahertz commented 2 years ago

Hello!

I use your class old time, but now all imdb url data n/a. :( What could be the problem?

FabianBeiner commented 2 years ago

Please see https://github.com/FabianBeiner/PHP-IMDB-Grabber#bugs and post the output.

gigahertz commented 2 years ago

Running: fetchUrl("https://www.imdb.com/title/tt2948356/") Running cURL: https://www.imdb.com/title/tt2948356/reference cURL returned wrong HTTP code “0”, aborting. YEAR: https://www.imdb.com/title/t356/ => 2948 Running cURL: https://www.imdb.com/title/tt2948356/reference cURL returned wrong HTTP code “0”, aborting. Cache created: 0cf728b3e238acc69aa58faf787003de822ff38a.cache

<?php $IMDB = new IMDB("https://www.imdb.com/title/tt2948356/"); echo "<p>" . $IMDB->getPoster($sSize = 's', $bDownload = false) . "</p>"; echo "<p>" . $IMDB->getRating() . "</p>"; echo "<p>" . $IMDB->getCast($iLimit = 10, $bMore = true). "</p>"; echo "<p>" . $IMDB->getTitle($bForceLocal = true). "</p>"; ?>

Running: fetchUrl("https://www.imdb.com/title/tt2948356/") Using cache: 0cf728b3e238acc69aa58faf787003de822ff38a.cache n/A n/A n/A n/A

gigahertz commented 2 years ago

All directory attributes 777

FabianBeiner commented 2 years ago

I gave it a try, and it is working flawlessly on my side. Besides, the code “0” rather shows that it is most likely something at your side. If your server reaches IMDb, you'd get a real HTTP error code. Zero just means, that didn't happen. So maybe your server can't reach IMDb (anymore) or something like that.