tags:

views:

34

answers:

2

Hi, I have an apache server sunning at home for test purposes and I have an account with a uk isp. When using fsockopen on my home server everything works fine, I can connect on different ports (I am using specifically 25 for testing a mail server) but when I upload my site to my ISP then I can no longer connect using fsockopen - it just times out.

I take it they have a security restriction on their side preventing me from using this feature - am I correct in thinking this or is there another explanation for this?

A: 

Well as far as i know a timeout means that the remote host is unreachable. There are a few reasons for "unreachable", one of them is that your ISP is blocking outgoing connections wich PHP initializes. Another reason is that the remote host is blocking your connection, and a few other.

But basicly i think the reason is that your ISP is blocking the PHP feature.

To be sure that the remote host hasn't blocked the port, try to connect to it via telnet from your machine, if it works the port should be open. Normaly if you are trying to connect to a e-mail server via port 25 it should be available for every one.
additional, you could try do the following ini_set ('allow_url_fopen', 1);
A: 

Most likely, it's a firewall in "stealth" mode. When you try opening a socket to the port 25 on he remote server, it pretends that nothing's there. It's a quite common security measure.

Ivan Krechetov
i take it in that case then there is nothing I can do with regards to my current host, BT?
David
Well, if you do need it, arrange the access with your ISP.
Ivan Krechetov