Godaddy Hosting blocks port 43 (newbie)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warfque
    New Member
    • Mar 2006
    • 1

    Godaddy Hosting blocks port 43 (newbie)

    The program I have does a Whois search but can not use port 43 at Godaddy hosting.
    http://www.netbonded.com/whois/samswhois.inc.php.

    This is the code where the error occurs.

    function dolookup($domai n, $server){
    $domain = strtolower($dom ain);
    $server = strtolower($ser ver);
    if( $domain == '' || $server == '' ) return false;
    if( $this->m_cachelifetim e > 0 ){
    $data = $this->readfromcache( $domain, $server);
    if( $data != '' ) return $data;
    }
    $data = "";
    $fp = @fsockopen($ser ver, 43,$errno, $errstr, $this->m_connectionti meout);
    if( $fp ){
    @fputs($fp, $domain."\r\n") ;
    @socket_set_tim eout($fp, $this->m_sockettimeou t);
    while( !@feof($fp) ){
    $data .= @fread($fp, 4096);
    }
    @fclose($fp);

    if( $this->m_cachelifetim e > 0 ) $this->writetocache($ domain, $server, $data);
    return $data;
    }else{
    return "\n\Error - could not open a connection to $server\n\n";
    }
    }
    This is what the hosting company sent but I Do Not Known what to do with the code. It does not fit with this type of code. I have never programmed PHP. How do I redirect the port to where the hosting company has the proxy server?
    curl_setopt ($ch, CURLOPT_HTTPPRO XYTUNNEL, TRUE);
    curl_setopt ($ch, CURLOPT_PROXYTY PE, CURLPROXY_HTTP) ;
    curl_setopt ($ch, CURLOPT_PROXY, http://64.202.165.130:3128);
    curl_setopt ($ch, CURLOPT_SSL_VER IFYPEER, FALSE);

    Thank you
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I've never tried anything like this before or seen the CURL library but I think they intend you to do this before your code along with a curl_exec and then a curl_close after your code.

    However if this doesn't work then you should

    1. Read the php documentation about CURL so that you understand what it is trying to do

    2. Get back to the person/company that gave you this and ask for more help.

    Comment

    Working...