Skip to main content

Posts

Showing posts from October, 2011

PHP Function to return Country and City from an IP Address

Here is a PHP function which can return the Geo location of the submitted IP address. The function uses a free IP Locator API provided by http://ipinfodb.com/
For using this service you have to register to this website and they will provide you with an API key, with which you can access this free webservice.
The function below will return the Country and City of the supplied IP Address.
More details after this code

///////////// Code Start ////////////////////


function countryCityFromIP_CURL($ipAddr){

$contents ="";
/**
* Initialize the cURL session
*/
$ch = curl_init();
    $ipDetail=array(); //initialize a blank array
/**
* Set the URL of the page or file to download.
*/

$api_key="YOUR API KEY";
$api_url= "http://api.ipinfodb.com/v2/ip_query.php?key=".$api_key."&ip=".$ipAddr."&timezone=false";


curl_setopt($ch, CURLOPT_URL, $api_url );
curl_setopt($ch,CURLOPT_TIMEOUT,20); 
/**
* Ask cURL to return the contents in a variable
* instead of simply ec…

Top Most SEO Tips - Search Engine Optimisation Techniques

Search engine optimization (SEO) is the process of improving the visibility of a website or a web page in search engines  

Top SEO Tips to improve Your websites Position in Search Engines:

Proper usage of Title, keywords and description of pages

Title :keep the title under 66 characters and relevant to the content on the page.

Keyword selection: Find the Best from your keywords
Behavioral-targeting and using Long Keywords are good way to get higher ranking for keywords that generate sales, and will give excellent search results.

Poor keyword examples would be: rooms,rent,house,realestate . Here are some examples of keywords that are ideal for Search engine optimisation:

    * Houses for Buying or rent in Mumbai
    * High Quality Tea dust
    * Rooms for rent in Kakkanad

Description: get your most important keywords into your homepage title and meta description.


URLs : SEO Friendly URLs - descriptive urls
Instead of used urls like http://www.abc.com/index.php?cat=67&item=24 use like
http://w…

Topmost Blog Submission Websites

Why Submitting blogs to blog directories?
If you want good exposure to your blogs, then blog directory submission is one of the best ways to  boost up the exposure to your blogs. Blog directory submission will not only give your blog the required online exposure but also give your blog good quality links. It is not only websites that need good back links, even blogs require good quality back links to get the required ranking in the search engines.

Topmost Blog Submission Websites
WeBlogAlot WeBlogALot.com - The Power of Blogs | Visit weblogalot.com http://www.killerstartups.com/submitted/
Add Your Blog To develop, create and maintain the biggest comprehensive online directory catalog of blogs (web logs) on the internet today. http://www.addyourblog.com/
Top Blog Area Blog Directory, Submit blog - TopBlogArea.com www.topblogarea.com/
BlogTopList Blog Directory, Submit Blog Submission - Blog Toplist - Show All Academics Arts Automobile Business Computers - Hardware - Software Entertainment Foo…

PHP Coding Practice - Memory Saving Tips

Here are some tips you can try to prevent the "PHP script running Out of memory" Problem.

Poor programming techniques or lack of knowledge in what affects memory can end up with a situation like script running out of memory

The error is something like "Fatal error: Out of memory (allocated 45613056 bytes exhausted) "

Few things you can do

1. Check which part of your code  using the most amount of memory.

PHP function for this :

//--------Code Start------
memory_get_peak_usage();
//-------Code End-------

This function will return the current memory usage at the point it is executed. You'll eventually see where your script is using the most amount of memory


2. Destruct your object references upon disposing of an object

__destruct method to your objects which unsets all references to other objects.

//--------Code Start------

protected function __destruct()
{
  $this->childObject = null;
}

//--------Code End------



3. Use functions where possible

After executing a function, PHP c…

Joomla and Forum Integration - Integrating Forums to Joomla

Joomla is one of the most popular CMS opensource packages. It is very easier to develop website's using Joomla. You just need to download Joomla package from Joomla's Official website www.joomla.org  and install it on your domain and later adding customizations to templates and feature and Your website is ready :). Now a days most websites provides a forum section for it users for discussing various article topics, gathering opinions etc.



Following are some best know forum opensource packages which can be integrated with Joomla and create a new forum experience for users

Amazing Scroller functions - useful for Web designers

Sub-Domain Tracking and Cross Domain Tracking with Google Analytics code.

Sub-Domain and Cross Domain Tracking

Millions of website admins use google analytics code to track the traffic on their website. However, Google Analytics does not automatically track a single visitor across different domains or sub-domains using the default set of tracking code, so some customization of the default code has to take place.



Google has given customization example in their support forums, please check the following article.

Urgent requirement for blood - Amrita Hospital Ernakulam

Blood required urgently.
A person who is under treatment in Amrita Hospital Ernakulam urgently requires blood. Donors with any group can donate.
Please contact Ramdas : 9744184427


Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »
Member
Search This Blog