我相信我的托管公司最近可能会发生一些变化,因为它以前工作过。然而,它们是无用的。
我已经使用file_get_contents
which 在文件中加载.. 老实说,它是代码包的一部分,我不是 100% 它的作用。但是,url 相当长,它只是简单地回显文件的结果:
IE
$custom = getRealIpAddr()."|||||".$_SESSION['cart']."|||||".makeSafe($_GET['i'])."|||||".$lang;
$pphash = create_paypal_hash(makeSafe($_SESSION['cart']), '', create_password('####'), $custom);
$tosend = base64_encode(urlencode($pphash));
$cgi = "http://www.***********.com/pl/b.pl?a=".$tosend; // TEST LINE
echo file_get_contents($cgi);
这会产生大约 390 个字符的 URL。如果我将其缩减到大约 360 个字符,它可以正常工作 - 但这不是解决方案,因为我丢失了一些传递到文件中的 GET 数据。
任何想法在我的主机上可能会发生什么变化,现在导致 url 的 360 多个字符引发 403 禁止错误?
我也尝试过 curl 方法 - 它也给出了相同的结果:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $cgi);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
echo $output;