The (AGI) Asterisk Gateway Interface is an interface for adding functionality to Asterisk with many different programming languages. Perl, PHP, C, Pascal, Bourne Shell, or any other programming language that you like.
To use AGI, create an extension on extension.conf, with this format (example extension number 5151):
exten => 5151,1,AGI(test.php)
Then place the script (for example in PHP, test.php) on the specified AGI folder in asterisk.conf, for example in /var/lib/asterisk/agi-bin.
The script should be executable, so you must first chmod +x to the script.
As an example, let create simple AGI application that fetch the web for a currency data and speak it to the caller. To simplify our self, we are going to use PHP and PHPAGI library.
Read more…
This article explains how to utilize Tor project in our own PHP application using Curl Library.
Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.
We start by installing and configuring Tor and the necessary software then we create a simple application that fetch a website address anonymously.
Read more…
Well I’m sorry, it’s been so long for this part to come.. I had been working very hard on some clients and don’t have enough time to write. Here’s what I had been done if you’re curious :) : http://maps.GpsTrackingIndonesia.com, www.SunberryCorp.com, www.mypushme.com, www.kulacak.com, www.web2trace.com, www.pushmeportal.com, … The fun is almost all of them was written with CodeIgniter :).
Ok, let’s start with the easiest one first. We will create a simple menu page that contains links to other modules on the system. We put it on the Mainpage controller class.
Look at the Mainpage.php controller file. There is a function on it named exactly the same with the filename: Mainpage(). This should be exactly the same including the case. This is the constructor or initialization function of the class. Each time the class is called or instantiate, this function is called automatically. We put some initialization lines inside it:
Read more…
NetBeans™ IDE 6.8 offers best-in-class support for the entire Java™ Platform Enterprise Edition 6 specification and the Sun GlassFish™ Enterprise Server v3 platform. Simplify Java application development with Java EE 6 language features: less XML configuration and more POJO-like development; easily target and deploy to GlassFish v3.
NetBeans IDE continues to be the tool of choice for top development languages, and this release includes new features and improved support for PHP 5.3 and the Symfony framework, the latest JavaFX™ SDK 1.2.1, C/C++, Ruby, Maven and more. Integration with Project Kenai, a collaborative environment for hosting open-source projects, now offers full support for JIRA, as well as improved issue tracker integration. As always, the NetBeans Platform provides a rock-solid application framework that can save years of development time.
Supporting Java EE 6 improvements first, NetBeans IDE 6.8 boosts developer productivity and lets developers take advantage of today’s latest languages and platform features.
NetBeans IDE 6.8 is available in English, Brazilian-Portuguese, Japanese and Simplified Chinese.

Read more…
Generate PHP Code
After installing StarUML PHP 5 Code Generator Template , StarUML will have a capability to generate PHP template code based on the models we have defined before. But there’s a little hack to be done so that the naming of the file generated complies with CodeIgniter.
These PHP template code files can be used to simplify our jobs by not typing all class’ attributes and methods that we have done in the UML design and analysis phase.
Read more…
Pagination class is very useful when we are handling a very large set of data. With it, users can see a page of data sets for only 10 or 20 rows and provided with page navigation where user can go to the next and previous page or directly jump to a page number. CodeIgniter has a class for doing this, but we must make a link to the data to be paginated to make it works correctly.
This article show you how to make the link between pagination class and database class to make the pagination works on a table that has a large set of data inside it.
Read more…
This class is used to encode a number of coordinates into an encoded polylines to be used in Google Maps. The code is originally from Jim Hribar http://www.jimhribar.com/cgi-bin/moin.cgi/PolylineEncoder and is rewritten by Gabriel Svennerberg www.svennerberg.com into a class and modified by me into CodeIgniter library. The code is written using the methods and algorithms found in the work of Mark MacClure http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline
Read more…
Passing parameter to a web page build with CodeIgniter (CI) can be done by using either POST variables which comes from HTML form or from the URI. But, different from traditional web application, by default CI only recognizes a segment based URI rather than query string format for passing parameter by URI.
In some circumstances we do need to use the query string to pass data to our page, which in this case using PHP global variable $_GET. By default, CI will not allow us to read the content of $_GET variable but instead using the URI class $this->uri->segment(the_segment_number).
Read more…
In the previous parts of this tutorial series we have discussed how to setup the application environment using XAMPP and CodeIgniter, and the application specification. We have done the analysis and design using UML use case and class diagram with free UML diagram tool StarUML.
In this part, we will discuss the database design for our application. This database is needed to hold the data for our application.
We are going to draw the entity relationship diagram (ERD) using a free tool called MySQL workbench, formerly fabForce ERD tools for MySQL. Before continuing, please download the program here and install it to your computer.
At the end of the designing process, we will create our database structure directly to a MySQL server that can be used by our application.
Read more…
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program thus making it behave as expected. PHP has an extension that allows us to debug PHP scripts in live manner, called Xdebug. This article explains how to use and configure Xdebug within phpDesigner IDE from MPSOFTWARE. Debugging with Xdebug allows the programmer to analyze, evaluate and find errors in the code line by line.
Read more…
Recent Comments