Results 1 to 5 of 5
  1. #1
    hi, small prob?
    ok - i have a PHP WHOIS and it works on other hosts - it always worked,
    i currently have an alt. account as a reseller with directadmin.
    fsocketopendoesn't work, why
    any clue
    i tried that function to retrieve a webpage and it worked but, for whois, nothing, (the whois server is not down, etc.)
    thx.

  2. #2
    Join Date
    Apr 2005
    Posts
    1,767
    I think you mean fsockopen()
    If you are using that, what timeout settings are you using, show some code..

  3. #3
    ok
    here - i tested on another server - ok!
    http://eliot.comze.com/s.htm
    (enter a .com to test)
    the code below does not work on my host, direct admin acct. thx.
    <pre>
    <?php
    function WhoIs($DomainName)
    {
    // Open a socket to geektools.com, one of the whois servers
    $Socket = fsockopen("whois.crsnic.net", 43, $ErrorNum, $ErrorStr) or die("$errno: $errstr");
    fputs($Socket, $DomainName."\n");
    // Receive data from the whois server and put into a string
    while(!feof($Socket))
    {
    $WhoIsString .= fgets($Socket, 2048);
    }
    // Close the stream and return the string
    fclose($Socket);
    return $WhoIsString;
    }
    if (isset($_GET['inputText']))
    {
    echo $_GET['inputText'];
    $who=WhoIs( $_GET['inputText']);
    }
    echo "<pre>".WhoIs( $_GET['inputText']);
    ?>

  4. #4
    Join Date
    Apr 2005
    Posts
    1,767
    This might be the hosts firewall. Ask them to open up port 43 outbound for your account to that hostname, they should let you do that.

  5. #5
    ok, thats sounds like a solution. i emailed them, ok, happy holidays.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •