+ Reply to Thread
Results 1 to 4 of 4

Thread: Connection Issues

  1. #1
    froger is offline x10Hosting Member froger is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    49

    Connection Issues

    Well, the problem started about 6 days ago. The script I have been using for some time to send Net Alerts had suddenly started giving me connection issues. Everytime I try and go onto my page I will get a connection timed out error. Here is the script...

    Code:
    function netAlert($sub_id, $title, $msg_page) {     
    // sends a Net Alert to phone $sub_id with URL $msg_page entitled $title
    // written by Roy Wilkie June, 2007  
    // This only works with iDen phones (Nextel)  
    // $sub_id is your subscriber id, find it under 'my account' in  openwave.
    
    // for more Nextel text messaging info see;
    //  http://developer.sprint.com/site/global/develop/technologies/wireless_markup_msg/developer_guide/p_coding_messaging.jsp
    
    $fp = fsockopen("atlsnup2.adc.nexteldata.net", 4445, $errno, $errstr,  90);
    if (!$fp) {
        print "$errstr ($errno)<br />\n";
    } else {
    
        $page = "\r<?xml version=\"1.0\"?>";
        $page .= "<!DOCTYPE ALERT PUBLIC \"-//PHONE.COM//DTD ALERT  1.0//EN\" \"http://www.phone.com/dtd/alert1.xml\">";
        $page .= "<ALERT LABEL = \"".$title."\" COUNT = \"1\" HREF = \"\"  URGENCY = \"HIGH\" />";
        $page .= "</xml>\r\r";
    
        $content_length = strlen($page) - 3;  
    
        $head = "POST /ntfn/add HTTP/1.0\r\n";
        $head .= "Accept: text\r\n";
        $head .= "Content-type: application/vnd.uplanet.alert\r\n";
        $head .= "Content-Length: ".$content_length."\r\n";
        $head .= "x-up-upnotifyp-version: upnotifyp/3.0\r\n";
        $head .= "x-up-subno: ".$sub_id."\r\n";
        $head .= "x-up-ntfn-channel: push\r\n";
        $head .= "x-up-ntfn-ttl: 0\r\n";
        $head .= "Content-Location: ".$msg_page."\r\n";
        $head .= "\r\n";
    
        $send = $head.$page;
    
        fwrite($fp, $send);
    
        fclose($fp);
    }
    
    }

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Connection Issues

    If you're on a free server, port 4445 should be blocked by the firewall; that your script worked before was an oversight. The paid servers have different rules and have more open ports, but still block all but a few commonly used ones. With a VPS account, you can have any port you wish open.
    Last edited by misson; 04-18-2010 at 04:52 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    froger is offline x10Hosting Member froger is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    49

    Re: Connection Issues

    Quote Originally Posted by misson View Post
    that your script worked before was an oversight.
    Meaning? My script was working 6 days ago without a problem. I was capable of sending my phone and many of my users net alerts. Did the rules just change for that port or something?

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Connection Issues

    Meaning that the port shouldn't have been open. If it was, it was a mistake. The policy hasn't changed, though the erroneous rules may have been.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Connection Issues
    By hyssyd in forum Free Hosting
    Replies: 0
    Last Post: 02-04-2010, 12:42 AM
  2. Connection Issues
    By cricket8 in forum Free Hosting
    Replies: 1
    Last Post: 11-13-2009, 07:32 AM
  3. cPanel issues and Joomla File Manager issues
    By monkey050 in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 05-22-2008, 02:14 PM
  4. FTP Connection Issues
    By AnimaVex in forum Free Hosting
    Replies: 8
    Last Post: 05-19-2008, 04:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers