Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
357 views
in Technique[技术] by (71.8m points)

php - How solve HTTP request failed! HTTP/1.1 463?

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:

$httpRequest->setHeaders(array('User-Agent' => 'Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2')); 

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...