Archive for the ‘Php scripts and Tutorials’ Category

script to create a php site crawl robot easily

Posted on: August 30th, 2012 by Mohammed Aqeel 4 Comments

The following tutorial is a simple example of how to create a site crawl robot with php. This can be used for search engines, creating caches of your sites at regular intervals etc. The crawler uses php’s CURL library to fetch the URL contents. It will then look for an anchor tag inside the page […]

PHP code to create a calendar for the month

Posted on: August 11th, 2012 by Mohammed Aqeel No Comments

This code snippet will help you to create a calendar through a few lines of php code which you can easily style with simple css and html. You can easily create your php web based calendar in just two steps. You may ask why this is needed when many calendar scripts are out. You are […]

Recursively walk in a directory and delete all matched files with php

Posted on: July 9th, 2012 by Sarath C 4 Comments

This simple code snippet will help you to recursively walk in a directory and delete all matched files. For example if you have a nested directory with around 10000+ folders and you want to remove all the .txt / .htaccess files inside that directory and sub directories, you ca use the following function. Copy and […]

How to get the IP address of users and Country, State and locations

Posted on: June 16th, 2012 by Mohammed Aqeel 18 Comments

Many times we have received the private mails requesting the help to track the IP address of the users. Here is a simple php code to get the IP address of the user. With a little addition to the code, you can get the location details of the user like Country, State and city. Please […]

Easily create short URLS with php, curl and goo.gl or bit.ly

Posted on: April 21st, 2012 by Raez Mon 7 Comments

The 140 character limit in twitter has made the necessity of URL shortner services. There are many URL shortening services available like http://goo.gl, http://bit.ly, http://ow.l etc.. You can even have your own short URL service, if you are so much worried about your brand. Deciding which type to use is surely a decision based on […]

Getting file extension with PHP

Posted on: January 20th, 2012 by Mahin No Comments

Here is a simple code snippet to get the extension of uploaded file via php 1] Method 1 $File_name = $_FILES[‘upload’][‘name’]; echo $File_extn = substr($File_name, strrpos($File_name, ‘.’)+1); 2] Method 2 Using php’s pathinfo() echo $ext = pathinfo($filename, PATHINFO_EXTENSION);

Random / Specific / Daily Quran Ayah plugin’s for elgg and wordpress

Posted on: August 1st, 2011 by Mohammed Aqeel 6 Comments

This is my first modules for Elgg and WordPress after joining Team Webgalli. Let me know if you have any comments. You can download the plugin from following links.   Full description: This plugin will show Random/Specific Quran Ayaths in anywhere in your site or as widget Features Show random Quran Ayahs as a widget […]

How to integrate paypal payment gateway with your websites.

Posted on: May 24th, 2010 by Raez Mon 11 Comments

Ever wondered how to integrate payment gateways like paypal for your sites? Team Webgalli ih having pretty good experience with php and paypal integration. If you need to integrate paypal with your site, drop us a mail and we can do that for you. We do both payment gateway and donation gateway. You can read […]