$fri = $myfollowers['friends_count']; $name = $myfollowers['name']; $place = $myfollowers['location']; $id = $myfollowers['id']; $status = $myfollowers['statuses_count']; $follower = new Follower(); $follower->id = $id; $follower->name = $name; $follower->screen_name = $myname; $follower->followers_count = $fol; $follower->friends_count = $fri; $follower->statuses_count = $status; $follower->location = $place; $follower->profile_image_url = $thumb; //echo $follower->id; $follower_dao->add($follower); } $follower = ""; //menghapus objek follower //mengambil data following dari user dan menyimpannya ke tabel following $following_url = "http://api.twitter.com/1/statuses/friends/{$user->id}.json"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $following_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $curlout = curl_exec($ch); curl_close($ch); $following = json_decode($curlout, true); $following_dao = new Following_dao(); $following_dao->deleteAll(); foreach ($following as $myfollowing) { $myname = $myfollowing['screen_name'];