Impossible to connect to the server

Status
Not open for further replies.

Marko

New Member
Messages
90
Reaction score
0
Points
0
Stryk0ur said:
http server of x10hosting are under firewall or what ?
Hosting service under firewall? lol:biggthump
Of course not
 

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
so why connection is impossible ? and when I test script on my computer it work ?
 

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
no I am not I try this
<?php
$fp = fsockopen ("http://84.95.247.20", 6958, $errno, $errstr, 30);
if(!$fp) {
echo $errstr;
} else {
fwrite($fp, "GET / HTTP/1.1\r\nHost: http://84.95.247.20:6958\r\nConnection: Keep-Alive\r\n\r\n");
$data = '';
while(!feof($fp)) {
$data .= fread($fp, 4096);
if(substr($data, -9)=="\r\n\r\n0\r\n\r\n") {
exit;
}
}
}
echo $data;
?>

and I found Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /backup/home/stryk0ur/public_html/socks.php on line 2

Warning: fsockopen(): unable to connect to http://84.95.247.20:6958 in /backup/home/stryk0ur/public_html/socks.php on line 2
Success
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Hmm,.. . You never answered my question, but anyways.. I think I know what is causing the problem you're having.

The PHP function fsockopen() does not support the URL transport/wrapper "http://", instead you could just use the IP address alone, like:

Code:
fsockopen('84.95.247.20', 6958, $errno, $errstr, 30);


Try that out and let me know how it turns out.

Also for your reference, you could check out PHP's supported socket transports.
 
Last edited:

Stryk0ur

New Member
Messages
42
Reaction score
0
Points
0
sorry I am not behind firewall or router

with http I found this error
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /backup/home/stryk0ur/public_html/socks.php on line 2

Warning: fsockopen(): unable to connect to http://84.95.247.20:6958 in /backup/home/stryk0ur/public_html/socks.php on line 2
Success

without http i found this error
Warning: fsockopen(): unable to connect to 84.95.247.20:6958 in /backup/home/stryk0ur/public_html/socks.php on line 2
Connection timed out

script is
<?php
$fp = fsockopen('84.95.247.20', 6958, $errno, $errstr, 10);
if(!$fp) {
echo $errstr;
} else {
fwrite($fp, "GET / HTTP/1.1\r\nHost: http://84.95.247.20:6958\r\nConnection: Keep-Alive\r\n\r\n");
$data = '';
while(!feof($fp)) {
$data .= fread($fp, 4096);
if(substr($data, -9)=="\r\n\r\n0\r\n\r\n") {
exit;
}
}
}
echo $data;
?>

when I rty in my IE explorer 84.95.247.20:6958 is does'nt work but with http://84.95.247.20:6958 it work !
maybe fsockopen it's disactivated can u try it by yourself ? to chek and thanks .....
 
Last edited:
Status
Not open for further replies.
Top