That's JSON, mate. Use PHP's json_decode function.
$affiche = utf8_encode($affiche);
json_decode($affiche) or die('error');
That's not json. It's some serialization format that looks like jason, like yaml or something.
[COLOR=#333333][FONT=Consolas]print_r($movie->getArray());[/FONT][/COLOR]
=> 205450 [movieType] => Array ( [code] => 4002 [$] => Long-m�trage ) [originalTitle] => Fifty Shades of Grey [title] => Cinquante Nuances de Grey [productionYear] => 2015 [nationality] => Array ( [0] => Array ( [code] => 5002 [$] => U.S.A. ) ) [genre] => Array ( [0] => Array ( [code] => 13010 [$] => Erotique ) [1] => Array ( [code] => 13008 [$] => Drame ) [2] => Array ( [code] => 13024 [$] => Romance ) ) [release] => Array ( [releaseDate] => 2015-02-11 ) [runtime] => 7500 [synopsisShort] => L'histoire d'une romance passionnelle, et sexuelle, entre un jeune homme riche amateur de femmes, et une �tudiante vierge de 22 ans. [castingShort] => Array ( [directors] => Sam Taylor-Johnson [actors] => Jamie Dornan, Dakota Johnson, Jennifer Ehle, Eloise Mumford, Victor Rasuk ) [movieCertificate] => Array ( [certificate] => Array ( [code] => 14001 [$] => Interdit aux moins de 12 ans ) ) [poster] => AlloImage Object ( [imageIcon:AlloImage:private] => [imageBorder:AlloImage:private] => [imageSize:AlloImage:private] => [imageHost:AlloImage:private] => fr.web.img1.acsta.net [imagePath:AlloImage:private] => pictures/14/11/14/11/08/371396.jpg ) [trailer] => Array ( [name] => Bande-Annonce Cinquante Nuances de Grey [code] => 19549475 [href] => http://www.allocine.fr/blogvision/19549475 ) [dvdReleaseDate] => 2015-06-16 [bluRayReleaseDate] => 2015-06-16 [link] => Array ( [0] => Array ( [rel] => aco:web [name] => Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm_gen_cfilm=205450.html ) [1] => Array ( [rel] => aco:web_casting [name] => Casting Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/casting/ ) [2] => Array ( [rel] => aco:web_trivia [name] => Anecdotes Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/secrets-tournage/ ) [3] => Array ( [rel] => aco:web_showtimes [name] => S�ances Cinquante Nuances de Grey [href] => http://www.allocine.fr/seance/film-205450/ ) [4] => Array ( [rel] => aco:web_publicreviews [name] => Critiques Spectateurs Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/critiques/spectateurs/ ) [5] => Array ( [rel] => aco:web_pressreviews [name] => Critiques presse Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/critiques/presse/ ) [6] => Array ( [rel] => aco:web_shots [name] => Photos Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/photos/ ) [7] => Array ( [rel] => aco:web_trailers [name] => Bandes annonces Cinquante Nuances de Grey [href] => http://www.allocine.fr/videos/fichefilm-205450/toutes/ ) [8] => Array ( [rel] => aco:web_products [name] => Cinquante Nuances de Grey [href] => http://www.allocine.fr/film/fichefilm-205450/vod-dvd/ ) ) ) [/B]
var_dump($movie->poster);
[h=2][SIZE=2]object(AlloImage)#306 (5) { ["imageIcon":"AlloImage":private]=> bool(false) ["imageBorder":"AlloImage":private]=> bool(false) ["imageSize":"AlloImage":private]=> bool(false) ["imageHost":"AlloImage":private]=> string(21) "fr.web.img1.acsta.net" ["imagePath":"AlloImage":private]=> string(34) "pictures/14/11/14/11/08/371396.jpg" }[/SIZE][/h]
require_once "spyc.php";
$data = Spyc::YAMLLoad($movie);
People are giving you wrong advice. It isn't JSON or YAML, it is the default serialization provided with PHP. The error you are receiving upon 'unserializing' is a problem with storing it in the database, which makes it corrupt.
What's the output of var_dump($dataa);?
Ok remove Spyc. Do var_dump($movies), paste in pastebin.com and reply with a link.
We get it, advertisements are annoying!
Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.