cURL support

Status
Not open for further replies.

jglasson

New Member
Messages
1
Reaction score
0
Points
0
I would like to access my web based home automation controller remotely, using cURL from a php program. I have my port forwarding set up to use a non 'well known port' . But curl_setopt($ch, CURLOPT_PORT, xxxx) does not work - the only port value that is accepted is 80. Any other port number results in a 'connect() timed out!' error.

I'm reluctant to use port 80 since I believe that it's more likely to get hacked than an obscure port number.

Is there any way around this problem - it seems to be specific to x10hosting since the php script works elsewhere.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
No, port 80 is all that's available for a number of reasons. Opening other ports would be server-wide (not account-based) and a potential source of account abuse. (Believe me, people try to get up to the nastiest sort of stuff on a semi-anonymous free host, even if they expect to be shut down in a matter of hours or minutes.) You can use just about any HTTP-based API, but your remote machine needs to be able to listen on port 80 (which is often a problem with home machines, since ISPs usually forbid listeners on port 80 for consumer accounts).
 
Status
Not open for further replies.
Top