Simple Mail to SMS gateway using Portech MV 37X

MobileSMSIn this post I will describe how to make a simple Email to SMS Gateway, using Portech MV37x and PHP code running on a Linux server.

Operation is simple: the code will poll the configured imap a folder, and if detect a new email it will send a Short Message Service (SMS) using the Portech hardware device. The recipient’s mobile number must be specified in the email subject (the subject must be a number or the email will be ignored) and the text will be the body in the email itself (truncated to 140 chars).
Continue reading

Install PHP 5.3 on IIS 7 Windows 2008 SP2

phpTShirtIn this post I’ll write about installation process of PHP 5.3 on Windows 2008 SP2 (not R2), with Sql Server support.
After some headcaches I’ve found that in Windows 2008 SP2 (NOT R2) it is possibile to install PHP 5.3 at most: with subsequent releases version the Sql Server driver for PHP won’t work in any way (missing depencies and other problems). Continue reading

Connect PHP in Debian Jessie to Ms Sql Server using FreeTDS

In this post we will connect Php code in Linux env (Debian 8 Jessie) to M$ Sql Server, using FreeTDS (latest vers.).

We start from a fresh installation of Debian 8 Jessie.

# apt-get update && sudo apt-get upgrade
# apt-get install apache2
# apt-get install php5
# /etc/init.d/apache2 restart
# apt-get install dpkg-dev
# apt-get install devscripts

To check that php5 works fine

# php -v
PHP 5.6.13-0+deb8u1 (cli) (built: Sep 7 2015 13:38:37)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

Now if all works fine you can continue. Click here to continue reading Php code in Linux to Ms Sql Server using Freetds

Asterisk Mail2Fax using FFA in poor man style !

FUNNY_TOILETS_LONMED_2549_03The serious name is email to fax gateway, but we prefer to call it “email2fax in poor man style”.
Problem
We have an asterisk pbx with Fax for Asterisk module from Digium installed correctly (or SpanDSP), and we want to implement in a very simple and fast way an email2fax procedure.
We can use the very simple script below, that we can run automatically every 10 min using cron. Continue reading