Я пытаюсь получить содержимое страницы через cURL + PHP, но это ничего мне не возвращает. Когда я заменяю URL-адрес google.com
, он работает.Что означает эта debug-verbose-info?
запрашиваемой страница Htaccess защищенного
это мой PHP-код
$login = 'admin';
$password = 'xxxxx';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_REQUEST['url']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$verbose = fopen('bla.txt', 'w+');
curl_setopt($ch, CURLOPT_STDERR, $verbose);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$output = curl_exec($ch);
curl_close($ch);
echo $output;
это многословный-инфо:
* Hostname was NOT found in DNS cache
* Trying xxx.xxx.xxx.xxx...
* Connected to xxxxxxxxx (xxx.xxx.xxx.xxx) port 80 (#0)
* Server auth using Basic with user 'admin'
> GET /mypage.php HTTP/1.1
Authorization: Basic YWRtaW46cXdlcnR6dTE=
Host: xxxxxxxxxxxxxx.de
Accept: */*
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 16 Sep 2016 13:44:28 GMT
* Server Apache is not blacklisted
< Server: Apache
< X-Powered-By: PHP/5.4.45
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Set-Cookie: PHPSESSID=23cd31457358a63a1b32b86992e906bf2; path=/; HttpOnly
< Location: xxxxxxxxxxxxxxxxxxxxxxx
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
может кто-то сказать мне, что случилось? ?
спасибо мужчина !! .. это было ключом :) – crunchy