Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 06-03-2007, 05:39 PM
Cleon Cleon is offline
Hatchling Croc
 
Join Date: Jun 2007
Posts: 3
Default blocked ports?

Hi all,

I've written a php script that trys to connect to my personal network camera and return the current frame image (jpg).

When my home router gets a request on port 81 it redirects it to my camera.

This set up works fine if I surve up the php at home. But when I serve it up from hostgators server I get a "can't connect to host" error from the php script.

I was wondering if it was maybe because HG was blocking access to port 81?

The php looks something like this (if someone is interested):

PHP Code:
<?php

    $ch 
curl_init();
    
    
$url "http://myhomerouteraddress:81/theimageiwant.jpg";

    
// set URL and other appropriate options
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_HEADER1);
    
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
    
curl_setopt($chCURLOPT_BINARYTRANSFER,1);
    
    
// grab URL and pass it to the browser
    
$content curl_exec($ch);
    if (
$content === false){
        echo 
'<pre>';
        echo 
curl_error($ch)."\n";
        echo 
'</pre>';
    }
    
// close cURL resource, and free up system resources
    
curl_close($ch);
    
    echo 
$content;    

?>
Anybody got clues?

Thanks in advance,
Cleon
Reply With Quote
  #2  
Old 06-03-2007, 05:56 PM
Morley's Avatar
Morley Morley is offline
Junior Croc
 
Join Date: Apr 2007
Location: Left of America - Right of Canada
Posts: 109
Default Re: blocked ports?

I assume you are using a FireWall? You probably need to enable port 81 in.
Reply With Quote
  #3  
Old 06-03-2007, 06:17 PM
Cleon Cleon is offline
Hatchling Croc
 
Join Date: Jun 2007
Posts: 3
Default Re: blocked ports?

Quote:
Originally Posted by Morley View Post
I assume you are using a FireWall? You probably need to enable port 81 in.
Thanks for the suggestion but I don't think thats the problem as I can access that port 81 url from another computer at my friends house for example
Reply With Quote
  #4  
Old 06-03-2007, 06:24 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,556
Default Re: blocked ports?

Quote:
Originally Posted by Cleon View Post
I was wondering if it was maybe because HG was blocking access to port 81?
Yes.
All ports are blocked by default, and only those are open that need to be open.
You can contact HG support and ask if they can open that port for you.
Or if it's possible for you to use some other port they could suggest an already open port.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #5  
Old 06-03-2007, 06:29 PM
Cleon Cleon is offline
Hatchling Croc
 
Join Date: Jun 2007
Posts: 3
Default Re: blocked ports?

Thanks for confirming, I'll get in contact with support
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 06:52 AM.