473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

fsockopen(); works on one server, but not the other...

Alright I made a gaming website, and I tested it first on my ownself-managed server, http://rfiles.info/spadegaming
The server status worked perfectly on my host. All 4/4 server showed ok.

Then I signed up for a hostrocket.com account (which is now http://spadesgaming.com ), and uploaded the SAME exact files to the site, and for some reason the status doesn't work on the two
"World of Warcraft" server ip's and it really doesn't make sense, since they are EXACTLY the same, just coming from two different servers. (Also, the other two servers in the list show ok) :S.

Here's the Code I'm using:

[PHP]function server_info_wow($ip,$port,$udp,$tcp,$ssl,$tls)
{
$online = 0;
$ip_header = "";
if($udp >= 1) $ip_header = "udp://";
if($tcp >= 1) $ip_header = "tcp://";
if($ssl >= 1) $ip_header = "ssl://";
if($tls >= 1) $ip_header = "tls://";

if (! $sock = fsockopen($ip_header.$ip, $port, $num, $error, 1))
{
$online = 0;
echo $error;
echo "($num)";
var_dump($sock);
}
else
{
$online = 1;
fclose($sock);
}

if($online == 0)
{
return 0;
}
elseif($online == 1)
{
return 1;
}
}[/PHP]
May be it's something I'm doing wrong...which hopefully is the case, because im baffled at this point.

Thanks in advance.

~Ryan
Jul 31 '07 #1
8 1858
kovik
1,044 Expert 1GB
Hmm... Is this a free host or something? Talk to them about their support of sockets.
Jul 31 '07 #2
Hmm... Is this a free host or something? Talk to them about their support of sockets.
Nah, it is not a free host. What am I supposed to ask them?
Jul 31 '07 #3
kovik
1,044 Expert 1GB
Nah, it is not a free host. What am I supposed to ask them?
Well, exactly where in your code is the failure?
Aug 1 '07 #4
Well, exactly where in your code is the failure?
oh that's weird, totally forgot to post the error.

It's error number 110, Connection timed out.
Aug 1 '07 #5
oh that's weird, totally forgot to post the error.

It's error number 110, Connection timed out.
help plese? been waiting for a couple days, just need to know what the possible cause is...I searched google.com millions of times.
Aug 2 '07 #6
bump. (still need help please :-\)
Aug 3 '07 #7
no one still not know? :(
Aug 9 '07 #8
kovik
1,044 Expert 1GB
I have absolutely no experience with sockets, so I really don't know what to tell you. If I wasn't already busy with a project, I'd try playing around with them, but to do it just for a post isn't something that I'd do... Have you talked to your host about it at all?
Aug 10 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Atarikid | last post by:
This script works fine on my redhat9 machine. I use it with Winblows PC I get an error. My site is not shown however it is a XML server accessible over simple HTTP post and get. The error is as...
3
by: Michael T. Peterson | last post by:
I am trying to get the file referenced by the following url: http://waterdata.usgs.gov/wa/nwis/uv?dd_cd=01&dd_cd=02&format=rdb&period=1&site_no=12149000 I'm using parse_url to get the host,...
2
by: Loopy | last post by:
I'm trying to write a script that will connect to an external site so that I can get access referer information in a database on another one of my sites. I got errors, so I tried to write a script...
9
by: fipaj1992 | last post by:
Hi! I have very big problem with fsockopen() function. It is very important... That's code: <?php $test = fsockopen ('chrome.pl', '8080'); ?>
3
by: yawnmoth | last post by:
Any IP address I try to open with fsockopen on a particular server seems to use another IP address instead. eg. I open a socket connection to 192.168.1.1 but the remote_addr that the other...
1
by: Henry16 | last post by:
Never seen such a situation ! Do you have once faced this problem ? We use a fsockopen to retrieve a content from a URL . The content is dispalid corretly on a page on one of our servers. But...
8
by: Yoko | last post by:
So I am using php version 4.3.9 and lets say i have a file on the server called tester.php so i am using fsockopen to point to that file but it gives me a error below. $fh =...
6
by: henryrhenryr | last post by:
Hi I'm really hoping for some ideas! I have been setting up phpmailer on my server and it was working nicely on my local server so I uploaded to my live server and tested. The mystery is that...
0
by: smokenlinks | last post by:
I am working on a script and i get this error Warning: fsockopen() : unable to connect to https://www.alertpay.com:443 (Unable to find the socket transport "https" - did you forget to enable it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.