PHP fopen() doesn't seem to work as expected

My project has a relay connected to an Arduino on the end of an ethernet cable. If I put the following into a browser (or use wget from a command line):

http://192.168.0.118:46169/?a=1

then the relay clicks as predicted.

However, if I try to open this URL with fopen (included in a file on the server):

fopen('http://192.168.0.118:46169/?a=1','r');

then nothing happens.

I've looked in the logs and there is nothing. php.ini has allow_url_fopen = On set

Logging into the server via SSH and running php test.php on the command line

(where test.php contains only the fopen command) works fine but I can't seem to run it from a browser.

Copying the test.php file to my laptop and running it from the localhost works too but this doesn't really help with my predicament

SOLVED...

$a=fopen($url,'r');
fgets($a);

That works fine... bizarre but there you go! :D