Code Monkey home page Code Monkey logo

yifyapi's Issues

movieDetail($row['YTS'], false);

Hi, I love your wrapper. I gives me GREAT info on new data. The problem I have is the data I've already collected. The above line dumps the info but how do I get at the torrents?

include('YTS.php');
$ytsag = new YTS();
$new_movie = $ytsag->movieDetail($row['YTS'], false);
$T1=$new_movie->torrents[0]."
";
$T1_url=$T1->url;

Just gives the error: Undefined property: stdClass::$torrents, I can see everything with a var_dump, I just can't seem to put it into variables.

Downed site

First of all, I love your program.
Is there a way to add something to abort, maybe not show an error when/if the site is down? I just started getting this error, this morning.

Warning: file_get_contents(): Peer certificate CN=ssl371477.cloudflaressl.com' did not match expected CN=yts.am' in /home/hev/www/www250/inc/YTS.php on line 195

Warning: file_get_contents(): Failed to enable crypto in /home/hev/www/www250/inc/YTS.php on line 195

Warning: file_get_contents(https://yts.am/api/v2/movie_details.json?movie_id=5&with_images&with_cast=): failed to open stream: operation failed in /home/hev/www/www250/inc/YTS.php on line 195

Fatal error: Uncaught Exception: HTTP request failed. Error was: file_get_contents(https://yts.am/api/v2/movie_details.json?movie_id=5&with_images&with_cast=): failed to open stream: operation failed in /home/hev/www/www250/inc/YTS.php:198 Stack trace: #0 /home/hev/www/www250/inc/YTS.php(72): YTS->getFromApi('https://yts.am/...') #1 /home/hev/www/www250/movie_details.php(257): YTS->movieDetail('5', false) #2 {main} thrown in /home/hev/www/www250/inc/YTS.php on line 198

I wounder

I wounder if there is a way to skip the "Fatal error: Uncaught Exception: HTTP request failed. Error was: file_get_contents" because when YTS is under maintenance or I'm off-line, most of my system crashs with that error. Like today, YTS is under maintenance but I'd still like to proceed.

$movie_details=@$ytsag->movieDetail($YTS, false);
var_dump($movie_details);
exit;

Never gets to the var_dump and I can't see how to by pass the error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.