Results 1 to 1 of 1

Thread: fsockopen cannot reach my server

  1. #1
    Join Date
    May 2008

    Cool fsockopen cannot reach my server

    The ubuntu server 7.10 runs behind a router with a port mapping using port 25011. I can access the website hosted on the server from outside the router. I have another hosting space where I place the main page of the website. Visitors go to the main page first, where php script fsockopen determines the first server status and redirects accordingly.

    I have tested the pingDomain function (below), and it works fine to reach sites like or

    But, I cannot reach the first server. Forget to mention that I test port check with, it says port 25011 is reachable.

    PHP Code:

    // Function to check response time
    function pingDomain($domain){
    $file fsockopen ($domain25011$errno$errstr8);
    $status 0;

        if (!
    $file$status = -1;  // Site is down
    else {
    $status 1;
    I dont know what is the problem. Is it the problem of ubuntu server configuration or PHP?

    Please help. Thanks in advance
    Last edited by rocksoccer; May 30th, 2008 at 05:48 AM.


Posting Permissions

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