note 105646 added to function.file-get-contents

From: Date: Sat, 03 Sep 2011 17:15:05 +0000
Subject: note 105646 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-182926@lists.php.net to get a copy of this message
<?php // file_get_contents and facebook api , how get the number of likes for you site $likes = array(); $url = 'http://demotivators.us/'; $request_url="https://graph.facebook.com/".$url; $requests = file_get_contents($request_url); // decode json $obj = json_decode($requests); $like_count=$obj->{'likes'}; if( !empty($like_count)) and ($like_count == 0)){ array_push($likes, $like_count); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 88.199.46.16 ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- https://master.php.net/note/edit/105646 Del: integrated -- https://master.php.net/note/delete/105646/integrated Del: useless -- https://master.php.net/note/delete/105646/useless Del: bad code -- https://master.php.net/note/delete/105646/bad+code Del: spam -- https://master.php.net/note/delete/105646/spam Del: non-english -- https://master.php.net/note/delete/105646/non-english Del: in docs -- https://master.php.net/note/delete/105646/in+docs Del: other reasons-- https://master.php.net/note/delete/105646 Reject -- https://master.php.net/note/reject/105646 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182926) next »