fabmsg Posted December 9, 2014 Share Posted December 9, 2014 Hi! I'm trying to make an button that when it's pressed sends an http post to my home server. But my home server is runing on port 84 and i think that i'm not being able to send the post correctly because of this port. any help? my code now is this: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://homeserver.net:84/?device=35"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); The way I have the URL is correct? thanks! Link to comment https://forums.phpfreaks.com/topic/292988-php-curl-with-port/ Share on other sites More sharing options...
WinstonLA Posted December 9, 2014 Share Posted December 9, 2014 Try to add CURLOPT_PORT curl_setopt($ch, CURLOPT_PORT, 84); Link to comment https://forums.phpfreaks.com/topic/292988-php-curl-with-port/#findComment-1499093 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.