Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   Болталка (https://forum.antichat.xyz/forumdisplay.php?f=46)
-   -   HELP!!!АВТОРЕГЕР (https://forum.antichat.xyz/showthread.php?t=90269)

Buffalon 03.11.2008 18:27

HELP!!!АВТОРЕГЕР
 
Запутался в GET запросах , почему мне ничего невыводит???
PHP код:

$socket=fsockopen("209.66.122.42",80); 

$in "GET http://www.master-x.com/ HTTP/1.0\r\n";
$in .= "Host: http://www.master-x.com/\r\n";
$in .= "Referer: www.master-x.com/\r\n";
$in .= "\r\n";

   
fputs($socket,$in); 
while(!
feof($socket)) 
    {
        
print_r(fgets($socket1024));
        }  
fclose($socket);  



Vid0k 03.11.2008 18:29

попробуй убрать
Цитата:

http://www.master-x.com/
в первой строке

Vid0k 03.11.2008 18:33

PHP код:

 $socket=fsockopen("209.66.122.42",80);  
 
$in "GET  HTTP/1.0\r\n"
$in .= "Host: http://www.master-x.com/\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "\r\n"

   
fputs($socket,$in);  
while(!
feof($socket))  
    { 
        
$result .= fgets($socket1024);
        }   
print 
$result;
fclose($socket); 


Buffalon 03.11.2008 18:36

Цитата:

Сообщение от Vid0k
PHP код:

 $socket=fsockopen("209.66.122.42",80);  
 
$in "GET  HTTP/1.0\r\n"
$in .= "Host: http://www.master-x.com/\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "\r\n"

   
fputs($socket,$in);  
while(!
feof($socket))  
    { 
        
$result .= fgets($socket1024);
        }   
print 
$result;
fclose($socket); 


Если HTTP убрать то всё работает))
А как быть с тем что мне возвращается только
<HTML><HEAD><META HTTP-EQUIV="refresh" content="1;URL=http://www.master-x.com"></HEAD></HTML>
И меня перенаправляет на главную((

diznt 03.11.2008 18:37

Ну зачем же так злостно карать дом адалта??? XDD

Buffalon 03.11.2008 18:40

Цитата:

Сообщение от diznt
Ну зачем же так злостно карать дом адалта??? XDD

А как нужно??? :confused:
Как твои зубы???

mr.The 03.11.2008 18:48

PHP код:

$in "GET http://www.master-x.com/ HTTP/1.0\r\n"
$in .= "Host: www.master-x.com\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "Connection: close\r\n"
$in .= "\r\n"

попробуй так. или так:
PHP код:

$in "GET / HTTP/1.0\r\n"
$in .= "Host: www.master-x.com\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "Connection: close\r\n"
$in .= "\r\n"


Buffalon 03.11.2008 18:51

Цитата:

Сообщение от mr.The
PHP код:

$in "GET http://www.master-x.com/ HTTP/1.0\r\n"
$in .= "Host: www.master-x.com\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "Connection: close\r\n"
$in .= "\r\n"

попробуй так. или так:
PHP код:

$in "GET / HTTP/1.0\r\n"
$in .= "Host: www.master-x.com\r\n"
$in .= "Referer: www.master-x.com/\r\n"
$in .= "Connection: close\r\n"
$in .= "\r\n"


Видимо это было правльно потому что он вернул
PHP код:

HTTP/1.1 200 OK
Date
Mon03 Nov 2008 14:42:00 GMT
Server
Apache/1.3.39 (UnixPHP/5.2.4 with Suhosin-Patch mod_gzip/1.3.26.1a
X
-Powered-ByPHP/5.2.4
Connection
close
Content
-Typetext/html

<HTML><HEAD><META HTTP-EQUIV="refresh" content="1;URL=http://www.master-x.com"></HEAD></HTML

Хм... .Защита???

diznt 03.11.2008 18:53

Buffalon да нормальна
Это как смастеришь автореггер кидай на форум!


Время: 02:28