I want to know how to extract an image of a site when you have the error HTTP request failed! HTTP / 1.1 463
?
The site airs to block all PHP queries, but it does not do so all internet servers.
I tested the script on One.com's servers that worked but it does not work anywhere else. I get the error 463, to be precise: HTTP request failed HTTP / 1.1 463
.
Here's the script:
<?php
header("Content-type: image/gif");
$habbo = $_GET['habbo']; // Habbo
$habbo2 = $_GET['habbo2']; // Habbo N°2
$habbo3 = $_GET['habbo3']; // Habbo N°3
$pays = $_GET['pays']; // Pays
$image = imagecreatefromgif("bureau_behind.gif"); // Bureau
$avatar = imagecreatefromgif("https://www.habbo.".$pays."/habbo-imaging/avatarimage?user=".$habbo3."&action=sit&direction=2&head_direction=2&gesture=sml&size=b&img_format=gif");
imagecopy($image, $avatar, 78, -16, 0, 0, 64, 110); // Lien Habbo
$avatar = imagecreatefromgif("https://www.habbo.".$pays."/habbo-imaging/avatarimage?user=".$habbo2."&action=sit&direction=2&head_direction=2&gesture=sml&size=b&img_format=gif");
imagecopy($image, $avatar, 48, -2, 0, 0, 64, 110); // Lien Habbo n°2
$avatar = imagecreatefromgif("https://www.habbo.".$pays."/habbo-imaging/avatarimage?user=".$habbo."&action=sit&direction=2&head_direction=2&gesture=sml&size=b&img_format=gif");
imagecopy($image, $avatar, 20, 10, 0, 0, 64, 110); // Lien Habbo n°3
$bureau = imagecreatefromgif("bureau_before.gif"); // Bureau image
imagecopy($image, $bureau, 0, 0, 0, 0, 300, 200); // Composition image
imagegif($image);
imagedestroy($image);
?>
Thanks in advance!
The status code
463 Restricted Client
is not being received under every condition:As the improvised table shows, a Chrome User-Agent on the
/habbo-imaging
directory is the only case to return a useful response, while the/api
directory blocks Chrome's User-Agent. Seems like they set different access restrictions for the directories. I also included the/api
directory since I encountered the same problem with that.I assumed 463 meant restricted to servers only, tried using the User-Agent of a Linux server and found out after varying that the keywords to make Habbo not respond with 463 are
Safari Google
.I have tried the URL you are building, besides the possibly problematic rights situation if you are not authorized by habbo to use their graphics, the code 463 does not happen with a normal browser.
The code 463 is a non-standard code. Maybe habbo is filtering your request by user agent string. You may want to try the
GET
again, using a different user agent identifier in your script:or something similar (see them all at http://www.useragentstring.com/). I took this example straight from the php documentation here: http://php.net/manual/de/httprequest.setheaders.php