[ "method" => "GET", "header" => "User-Agent: Mozilla/5.0 (+MistProfile/1.0; raindrops@equestria.dev)\r\n" ] ])), true); if (isset($data) && json_last_error() === JSON_ERROR_NONE && isset($data["image"]) && isset($data["image"]["view_url"])) { $profile["banner"] = $data["image"]["view_url"]; $profile["banner_orig"] = substr(strip_tags($_POST["url"]), 0, 120); } else { $profile["banner"] = $profile["banner_orig"] = substr(strip_tags($_POST["url"]), 0, 120); } } } file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/users/" . $_PROFILE["id"] . "-profileSettings.json", json_encode($profile));