Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sh = curl_init();
- curl_setopt($sh, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($sh, CURLOPT_URL, "http://api.allocine.fr/rest/v3/movie?partner=YW5kcm9pZC12M3M&code=".$id."&profile=large&format=xml&filter=movie&striptags=synopsis,synopsisshort");
- $url = curl_exec($sh);
- curl_close($sh);
- $content = json_decode ( $url );
- $movie = $content->movie;
- #TiTRE ORiGiNAL
- $OriginalTitle = $movie->originalTitle;
- #TiTRE
- $Title = html_entity_decode ( $movie->title );
- #AFFiCHE
- for ( $i = 0 ; count ( $movie->media ) > $i ; $i++ )
- {
- if ( $movie->media[$i]->type->code == 31001 )
- $Affiche = $movie->media[$i]->thumbnail->href;
- }
- #SYNOPSiS
- $Synopsis = $movie->synopsis;
- #SYNOPSiS SHORT
- $Synopsis_short = $movie->synopsisShort;
- #ANNEE DE PRODUCTiON
- $ProductionYear = $movie->productionYear;
- #REALiSATEUR
- $Realisateur = $movie->castingShort->directors;
- #GENRE
- $Genre = end ( $movie->genre[0] );
- #DUREE
- $Duree = secondsToWords ( $movie->runtime );
- #ACTEURS
- $Acteurs = $movie->castingShort->actors;
- #ORiGiNE DU FiLM
- $Origine = end ( $movie->nationality[0] );
- #BUDGET
- $Budget = $movie->budget;
- #DATE DE SORTIE
- setlocale ( LC_TIME, 'fr_FR.utf8', 'fra' );
- $Date_De_Sortie = strftime ( "%d %B %Y", strtotime ( $movie->release->releaseDate ) );
- #NOTE DE LA PRESSE
- $PressRating = round ( $movie->statistics->pressRating, 2 );
- #NOTE DU PUBLIC
- $UserRating = round ( $movie->statistics->userRating, 2 );
- #AGE MINIMUM
- $AgeLegal = $movie->certificate;
- #TRAILER
- $Trailer = $movie->trailer->href;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement