Hello,
I searched around a bit trying to find a script that will interface with an SNPP server, but was unable to find one, therefore I moved forward in trying to make a basic one on my own. It was going very well until I ran into problems inserting a carriage return at the end of each line. For some reason, it will not have the same effect as me pushing Enter on my computer. Can someone help me out with a suggestion, or solution?
Code:
<?php
$fp = fsockopen("68.46.171.26",444,$errno,$errstr, 10);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "PAGE 101\r\n";
$out .= "MESS TEST PAGE\r\n";
$out .= "SEND\r\n";
$out .= "QUIT\r\n";
fputs($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
Also, please note that rather than making variables since Im still testing the script, I just hard-coded their values. I do intend to correct this, before anyone makes any comments about that. 🙂
Thanks in advance for any help,
Joe