Connection Issues

froger

New Member
Messages
49
Reaction score
0
Points
0
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);
}

}
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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:

froger

New Member
Messages
49
Reaction score
0
Points
0
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?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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.
 
Top