There was a problem when fetching info from the instance, make sure you wrote the url correctly and without trailing slashes.
"; } else { $instance_list = scandir("../data/"); $cdata = parse_url($setting['url']); if(!in_array("$instance.php",$instance_list)){ $client = register_app($instance); file_put_contents("../data/$instance.php",'Unable to save instance details, please verify that the 'data' folder has writrable permissions."; die(); } } else { include "../data/$instance.php"; } $user_settings['replies'] = "on"; $user_settings['instance'] = "$instance"; $user_settings['text'] = "on"; $user_settings['reblog'] = "on"; $user_settings['explicit'] = "blur"; $user_settings['videoloop'] = "off"; setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/'); header('Location: '."https://$instance/oauth/authorize?response_type=code&client_id=".$client['client_id']."&redirect_uri=".$client['redirect_uri']."&scope=read+write+follow"); } } $bg = scandir("./bg/"); ?>