Hi,
I have been told by an sms company that i can open a permanent connection to a cgi script they have on there server at a given port.
I was using a simple fopen before - but now if i want to send hundreds of sms then a permanent connection is better right??
Ok here is the script so far:
$fp = fsockopen(CONNECTION, PORT, &$errno, &$errstr, 30);
IF (!$fp)
{
printf("Error: %s (%s)", $errstr, $errno);
}
ELSE
{
WHILE (list($mobilenumber) = each($listarray))
{
fputs ($fp, "user=&pass=&smsto=$mobilenumber&smsfrom=$smsfrom&subaccount=¬e=TESTSMS&logo_type=$type&img=$buff&mobile_operator_code=$networkarray[0]&B1=Send+SMS+Text+Message");
$data = fread($fp, 16384);
echo "$data";
}
$data = fread($fp, 16384);
fclose($fp);
OK the problem I have is that I dont know how to give the data to the company ie do i use fopen again - but i have an already open connection - is it fputs, fwrites etc.
Any help is very appreciated
Regards
Ian