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

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

问题描述

我想知道如何在出现错误 HTTP请求失败时提取网站图片! HTTP / 1.1 463
该站点阻止所有PHP查询,但并不是所有的Internet服务器。



我在One.com的服务器上测试了脚本,它在其他地方不起作用。我得到错误463,确切地说: HTTP请求失败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
$支付= $ _GET ['支付']; //支付

$ image = imagecreatefromgif(bureau_behind.gif); // Bureau

$ avatar = imagecreatefromgif(https://www.habbo。。$ pays。/ habbo-imaging / avatarimage?user =。$ habbo3。& action =坐&安培;方向= 2及head_direction = 2及手势= SML&安培;大小= b和= img_format GIF);
imagecopy($ image,$ avatar,78,-16,0,0,64,110); //联属哈宝
$ avatar = imagecreatefromgif(https://www.habbo。。$ pays。/ habbo-imaging / avatarimage?user =。$ habbo2。& action = sit& direction = 2及head_direction = 2及手势= SML&安培;大小= b和= img_format GIF);
imagecopy($ image,$ avatar,48,-2,0,0,64,110); //联合哈宝n°2
$ avatar = imagecreatefromgif(https://www.habbo。。$ pays。/ habbo-imaging / avatarimage?user =。$ habbo。& action =坐&安培;方向= 2及head_direction = 2及手势= SML&安培;大小= 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); //合成图像

imagegif($ image);
imagedestroy($ image);
?>

提前致谢!

解决方案

我已经尝试了您正在构建的URL,除了可能存在问题的权利情况外,如果您未经habbo授权使用其图形,代码463不会在正常浏览器中发生。

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

  $ 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


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!

解决方案

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

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

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