[ALUG] HOW TO SEND MESSAGE TO USER VIA KANNEL IN LINUX

Andreas Tauscher ta at geuka.net
Tue Jun 10 21:24:54 EAT 2014


> Dear my fellows, recently, i have been working on my individual
> project, 'ONLINE VOOKING SYSTEM'. i encountered the problem that my
> kannel system cannot send sms to user when invoked by http request.

The error message clearly tells what happened:
"failed to open stream: Connection refused"
Is the server running?

Next problem, is you are using file.
file can open urls an is storing the server reply in an array.
Status code, header and other things: Lost.
In your case anyway: The output goes direct to /dev/null

For communication with HTTP servers using the cURL class is much more
comfortable. Status codes from the server you get with curl_getinfo($ch,
CURLINFO_HTTP_CODE);
200 would be SMS sent, any other return code: Problem.
You get a lot of additional information for proper error handling.
http://au1.php.net/manual/en/book.curl.php

> Any help? i have included the screenshot of both my mail.php file and
> the error message i get. Any of the help will be greatly
> appreciated!

Next time: No fu....g screenshots, copy and paste this into the mail.
BTW: A mail subject only in capital letters looks not only ugly and is
difficult to read. It triggers also about 20 additional checks in the
amavis/spamassassin spam filter. Avoid it.

Andreas



More information about the Linux mailing list