Archive for the ‘Web Services’ Category

List the languages of each countries

October 18, 2010 Leave a comment

Below is a list of actions that I have took to extract the languages of each countries. I am sharing the procedure so If you can suggest some optimal procedure to carry out the same task.


  1. Visit the CIA world fact book page as mentioned above
  2. Copy that html code while holds the required data using Firebug
  3. Browse the file and copy the fields using pointer
  4. Paste the fields in the text file named languages.txt
  5. Learn how to read the file line by line from php manual
  6. Apply the following PHP script to filter out the data in terms of Country and Native languages

$myfile = ‘languages.txt’;
$lines = file($myfile);

$arr = explode(‘ ‘, $lines[$i], 2); // Seperate Country and Native languages
$native = $arr[1]; // Only native languages sperated by “,”
echo “<pre>”;
echo $arr[0];
print_r(explode(‘,’, $native));
echo “</pre>”;

What’s left:
Populating the database with the above extracted data.

Categories: Web Services Tags:

Joomla installation on Ubuntu

April 23, 2010 2 comments

Today’s we are going to see how to use google map mashup in a famous CMS – Content Management System which is Joomla.¬† Though the documentation is self explanatory I’ll just list te common mistakes that fly-over testers make while installing Joomla but let me tell you experience developers (like Mr. Nabeel Mushtaq) always prefer to read the documentation evertime you you have to install some package or framework because it’s like the movie “The Matrix” every time you find something to grab!

Move the downloaded zip file of the Joomla package to webserver’s root directory;-

# mv /home/user-name/Downloads/Joomla***.zip /var/www/joomla

Unzip it here

# unzip Joomla***.zip

Delete the existing configuration.php-dist file

# rm -rf configuration.php-dist

Most users don’t perform the above step and just rename the filename

# mv configuration.php-dist configuration.php

Due to whish while running the web wizard or installation it causes problems as the script feels dizzy while updated the already populated configuration.php file

Create a new unwritten file

# toucj configuration.php

Give’em writes to apache users to writeable

# chmod 755 configuration.php

Some users while rename the configuration.php-dist file to configurtion.php while fall at the end of the web installation wizard with a fatal error.

If you got permission errors I would suggest you should give apache user the rights to read write the joomla folder

#chown www-data /var/www/joomla -R

That’s it!

Zend Erroronicles

April 5, 2010 2 comments

Today we are going to list the couple of buys a noob has to face while getting started with the Zend framework;- The story while traveling to the Hello world ūüėČ


Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/landmark_collector/public/index.php on line 11

Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Loader.php’ (include_path=’/var/www/landmark_collector/application/../library:.:/usr/share/php:/usr/share/pear’) in /var/www/landmark_collector/public/index.php on line 11


Set the zend library path in the inlude_path for php


+ the following lines at the top of the file /var/www/website-name/application/bootstrap.php

define(“SITE_ROOT”, dirname($_SERVER[‘DOCUMENT_ROOT’]));


Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in /var/www/landmark_collector/library/Zend/Loader.php on line 258

Fatal error: Uncaught exception ‘Zend_Controller_Dispatcher_Exception’ with message ‘Invalid controller specified (error)’ in /var/www/landmark_collector/library/Zend/Controller/Dispatcher/Standard.php:242 Stack trace: #0 /var/www/landmark_collector/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /var/www/landmark_collector/public/index.php(25): Zend_Controller_Front->dispatch() #2 {main} thrown in /var/www/landmark_collector/library/Zend/Controller/Dispatcher/Standard.php on line 242


Categories: Web Frameworks Tags: , , , ,

GAE: Google App Engine

April 13, 2008 2 comments

An other application framework has been launched by google few weeks back. After successful launch of google Android platform which was basically for the development of mobile application completely open source as the underlying operatig system was linux and the app programming language was java. Todays’s the last date for the submission of the Android Application challenge.

Application Hosting:

It’s kind of web hosting service, google app engine is providing there server to host/run the application and getting use of the google customer base. the underlying app development language is python.

1- Google App Engine SDK

2- Python 2.5 or >

Why python because python is one of the three languages that has been used by the google developer at the house of google (C++, Java and python).

Break’n or Create’n Monopoly

On one side of the picture it seems that google is breaking the hype of monopoly created by facebook [the ones who put forward the concept of user generated data, application development framework and mashups] the approach then followed by other social netwoking sites like Orkut, hi5 and other wesites. And on the other side google is struggling to compete in the web space by launching such service and pusing developers inside it’s box. Developers hunt

Forcing to get hands dirty again
Now google is again forcing the developer to get their hands dirty with a new API; like me who has expertise in PHP but not in python…

Working on these platforms is addictive; at least for those guys who love to discover and achive new stuff through their programming skills.

Virtual Economy:
In the next 2 to 3 year what i see is that the virtual economy would break the reocrds with the introduction of such service which gives people an opportunity to earn money while sticking to their laptops.

Manually: Serial Port Connection with GSM Mobile on Windows

April 13, 2008 1 comment

Plug and Play:

Attach a device with the serial port to the windows machine and it automatical detects and conenct to the com1 of the port

Hyper Terminal:

Go Start> All Programs > Accessories > Communication Tools > Hyper Terminal

Now your are in Hyperterminal window

Configuring Connection with POrt :

Select File > New Configration  ; a dialogue box will appear

Entre Connection name >OK

Connect to > Select the com1 port >Entre

Configure port properties >OK

You are done with the connection.

Verify Connection:

Now test and verify by using basic AT commands



%d bloggers like this: