Esempio n. 1
0
                 } else {
                     if (filesize($theFile) == 0) {
                         file_put_contents($theFile, base64_decode($extendedprofile->picture));
                     }
                 }
                 $object->profilepicture = HOST . "slir/w100/snapchat/includes/webservices/images/extendedprofiles/" . $extendedprofile->id . ".jpg";
             } else {
                 $object->profilepicture = "http://i.imgur.com/tmqV1Vo.png";
             }
         }
     }
     $response = $objects;
 } else {
     if ($_GET['object'] == "shoutbox") {
         $sql = "SELECT * FROM " . T_SHOUTBOXES;
         $objects = ShoutBox::get_by_sql($sql);
         $filename = 0;
         if (count($objects) > 0) {
             foreach ($objects as $object) {
                 $theFile = "images/shoutboxes/" . $object->id . ".jpg";
                 if (!file_exists($theFile)) {
                     file_put_contents($theFile, base64_decode($object->picture));
                 } else {
                     if (filesize($theFile) == 0) {
                         file_put_contents($theFile, base64_decode($object->picture));
                     }
                 }
                 $object->picture = HOST . "includes/webservices/images/shoutboxes/" . $object->id . ".jpg";
             }
         }
         $response = $objects;