如何解决HTTP请求失败!HTTP/1.1 463? [英] How solve HTTP request failed! HTTP/1.1 463?

查看:27
本文介绍了如何解决HTTP请求失败!HTTP/1.1 463?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当您遇到错误 HTTP 请求失败时如何提取站点图像!HTTP/1.1 463?该网站会阻止所有 PHP 查询,但不会阻止所有 Internet 服务器.

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.

我在 One.com 的服务器上测试了该脚本,该脚本可以运行,但在其他任何地方都无法运行.我收到错误 463,确切地说:HTTP request failed HTTP/1.1 463.

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.

这是脚本:

<?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);
?>

提前致谢!

推荐答案

我试过你正在建的URL,除了没有habbo授权使用他们的图形可能会出现权限问题之外,不会出现463代码使用普通浏览器.

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.

代码 463 是非标准代码.也许 habbo 正在通过用户代理字符串过滤您的请求.您可能想再次尝试 GET,在脚本中使用不同的用户代理标识符:

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')); 

或类似的东西(在 http://www.useragentstring.com/ 上查看它们).我直接从这里的 php 文档中获取了这个示例:http://php.net/manual/de/httprequest.setheaders.php

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

这篇关于如何解决HTTP请求失败!HTTP/1.1 463?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆