What is PHP and its advantages and disadvantages..

June 26th, 2009 R Arun Raj No comments

Hypertext Preprocessor :: PHP some time  I used to call Personal Home Page

PHP is an open source server side scripting language that mainly used for developing web applications and web services.

The PHP is very simple for a beginner, but offers many advanced features for a professional script writer.

Three main areas where PHP scripts are used :

  1. Server-side scripting
  2. Command line scripting
  3. Writing desktop applications

Advantages :

  1. Open source
  2. Simple and very easy to learn.
  3. Support for both structural programming and Object Oriented Programming. Use of variable variables $$var.
  4. PHP can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, and probably others. PHP has also support for most of the web servers today. This includes Apache, Microsoft Internet Information Server, Personal Web Server, Netscape and iPlanet servers, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, and many others. For the majority of the servers PHP has a module, for the others supporting the CGI standard, PHP can work as a CGI processor.
  5. One of the most Sexiest feature of PHP is that it can plugin with most of the databases. It support with Adabas D, dBase, Empress, FilePro (read-only), Hyperwave, IBM DB2, Informix, Ingres, InterBase,  rontBase, mSQL, Direct MS-SQL, MySQL, ODBC, Oracle (OCI7 and OCI8), Ovrimos, PostgreSQL, SQLite, Solid Sybase, Velocis and Unix dbm
  6. Power ful built in functions. click here to see all php functions
  7. PHP also has support services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows)
  8. PHP has extremely useful text processing features, from the POSIX Extended or Perl regular expressions to parsing XML documents. For parsing and accessing XML documents,  PHP 5 standardizes all the XML extensions on the solid base of libxml2 and extends the feature set adding SimpleXML and XMLReader support.
  9. Easy deployment and cost effective hosting.

Disadvantages :

  1. Security flaws due to unknown vulnerabilities .
  2. Not good to create desktop Applications
Categories: PHP, Programming Tags:

Comparison between various programming languages

June 25th, 2009 R Arun Raj No comments

Today onwards I am willing to write series of articles about various programming languages. As a programmer we should compare all the programming languages, study its advantage and disadvantages . By these we can consult a correct platform for our clients and we can plug in this in appropriate situation. So advantages and disadvantages over the programming languages again converted for an advantages for the client.

First upon we discuss about programming languages.

A program is list of instructions that perform a particular task or algorithms. A programming language is a machine understandable artificial language that used to write the programs. All programming languages have its own syntax and semantics.

Programming must follow some methodology in programming .

During the  year 70s and 80s, the primary software engineering methodology was structured programming. The structured programming approach to program design was based on the following methods:

  • To solve a large problem, break down the problem into several pieces and work on each piece separately;
  • to solve each piece, treat it as a new problem that can itself be broken down into smaller problems;
  • repeat the process with each new piece until each can be solved directly, without further decomposition.

This approach is also called top-down program design.

The Language “C” is considered as a top Structural programming language.

The next was OOP (Object Oriented Programming):

This  methodology is  organized around “objects” rather than “actions” and data rather than logic. Objects is an identifiable entity with some characteristics and behavior. Object Oriented programming paradigm support the following idioms like information hiding, data abstraction, encapsulation, modularity, polymorphism, and inheritance.

The First OOP languages is “C++”. Then it enhanced by JAVA.

Aspect-oriented programming (AOP) is another programming paradigm that enhance modularity by allowing the separation of cross-cutting concerns, forming a basis for aspect-oriented software development.

These are the main programming paradigms. There is a lot of other paradigms . We will elaborate our knowledge by contributing your suggestions and information about it.

Categories: Programming, Softwares, design Tags:

Installing and configuring Asterisk

June 17th, 2009 R Arun Raj No comments

How to install Asterisk ?

How to run Asterisk ?

This youtube video help you to install, configure and run your astersisk the open source PBX.

Asterisk Callme Architecture with PHP AGI

May 12th, 2009 R Arun Raj No comments

Asterisk Callme :: The open PBX

Asterisk Callme :: The open PBX

Extensions Configuration

extensions.conf

[callme]
exten => s,1,AGI(callme.php|${CNUM})

CNUM is the variable passed to callme AGI Script

Callme.php Agi Script

#!/usr/bin/php
/**
* Author Arun Raj R
* @package phpAGI_for Call me
* @version 1.0
*/
set_time_limit(30);
require_once(”phpagi/phpagi.php”);
$agi = new AGI();
$agi->answer();
$result=$agi->stream_file(”welcome_to_call_me”);
$cid = $argv[1];
$agi->exec(”Dial Zap/g0/”.$cid, null);

?>

PHP File to run callme service request

<?php
require_once(”/var/lib/

asterisk/agi-bin/worker/phpagi/phpagi-asmanager.php”);
$number1=$_REQUEST['num1'];
$number2 = $_REQUEST[num2'];
$asm = new AGI_AsteriskManager();
$asm->connect(”localhost”, “username”, “password”);
$number = “Zap/g0/”.$number1;
$asm->send_request(’Originate’, array(’Channel’ => “$number”, ‘Context’ => “callme”, ‘Priority’ => 1, ‘Async’ => true,’callerid’=>”$number1″,’Variable’=>’cnum=’.$number2,
));
$asm->disconnect();?>

PHP:: How to split a large array in small pieces :: or split array into chunks

April 29th, 2009 R Arun Raj 1 comment

Hello All,
Yesterday i was searching for a solution to split large array into small pieces. Suddenly i noticed the that php have a built in function to split array into small pieces. It was very surprise to me ..
Here it is
Function : array array_chunk ( array $input , int $size [, bool $preserve_keys= false ] )

< ?php
$input_array = array('a', 'b', 'c', 'd', 'e');
print_r(array_chunk($input_array, 2));
print_r(array_chunk($input_array, 2, true));
?>

The output will be like this : –

Array
(
[0] => Array
(
[0] => a
[1] => b
)

[1] => Array
(
[0] => c
[1] => d
)

[2] => Array
(
[0] => e
)

)
Array
(
[0] => Array
(
[0] => a
[1] => b
)

[1] => Array
(
[2] => c
[3] => d
)

[2] => Array
(
[4] => e
)

)

Have fun Cheers

Categories: PHP, email Tags: , ,

Lenovo Service Problems – Cntd

April 29th, 2009 R Arun Raj No comments

This problem happened to my friend. So many time it is serviced. But the problem persist . Only the replacement of this laptop will resolve the problem . Please go through video.
The problem is It providing a long horrible beep sound on start up.

Lenovo Providing products with low quality . The main problem is that i have suggested this laptop. After this problem i got a lesson. I never suggest this lenovo or ibm products to any of my friends.

How to add cron job or scheduled task in windows server / parallel plesk control panel

April 27th, 2009 R Arun Raj No comments

Select scheduled Task from parallel plesk control panel
1. Select Scheduled Task from parallel plesk control panel.

2. Add new Task

Select Sheduled Task From the parallel presk

Select Sheduled Task From the parallel presk

Select Timings
3. Give the correct path to script program as shown in the figure.

Categories: Project Managament, Troubleshoot, email Tags:

New venture for adobe :: Adobe flash Digital TV

April 20th, 2009 R Arun Raj No comments
Adobe Flash for Digital Tvs

Adobe Flash for Digital Tvs

Increasing the number of broadband users will increase the demand for online market. Adobe lets move flash to online Digital TVs. Adobe on Monday said its Flash platform for running rich Internet applications and playing online video will  attract giant  online market. read more