
Sunday, September 16, 2012
Wednesday, September 5, 2012
Thursday, August 2, 2012
Create Bit.ly, TinyURL, Is.Gd, U.Nu and Won Short URLs Using PHP - API
I have create the process on script:
1. Bit.ly Short URLs Using PHP API,
2. TinyURL Short URLs Using PHP,
3. Is.Gd Short URLs Using PHP
4. U.Nu Short URLs Using PHP, 5. Won Short URLs Using PHP
1. Bit.ly Short URLs Using PHP API,
2. TinyURL Short URLs Using PHP,
3. Is.Gd Short URLs Using PHP
4. U.Nu Short URLs Using PHP, 5. Won Short URLs Using PHP
Wednesday, July 25, 2012
How to Create a Simple API with PHP and MySQL

Introduction:
This article will cover how you can create a very simple API for any one of your projects. We are going to be using PHP and MySQL for the back end, and we will output our API data in two formats: XML or JSON.
Friday, April 20, 2012
Executing PHP codes in WordPress Page/Post
Everyone want to write php code in wordpress as his mine. But wordpress support only its won code definitions. I wan to coded php in wordpress cms as like this code in a post and it should be work. but how......
[php]
<?php
echo "The year is: ";
echo date('Y');
?>
[/php]
There is a solution and I am giving you a plugin that you can write your php code as your mine.
For this you should follows the instructions-
[php]
<?php
echo "The year is: ";
echo date('Y');
?>
[/php]
There is a solution and I am giving you a plugin that you can write your php code as your mine.
For this you should follows the instructions-
Monday, February 27, 2012
Import CVS , Excel or XML file into MySQL with php
When we want to insert data into MYSQL which is already present in .CVS (comma separated values) or XML or Excel files. Reading the file row by row (say in PHP) and inserting into MYSQL is very poor style of coding which is inefficient and takes a lot of time. MYSQL has an inbuilt query and I will be elaborating about this.
Convert xml to cvs by php
I have used php 5.0 to convert xmx to cvs. Here "SimpleXML" reads an entire xml into an object that we can iterate through his properties.To write to the csv output file we will use "fputcsv". "fputcsv" formats a line as csv and writes it to the file.
Code of xml file (as the name "cars.xml") is here:
Code of xml file (as the name "cars.xml") is here:
Create favicon (*.ico) with imagick in php
Here is an example that will take any image format supported by Image Magick (is there one that is not?) and create a 16 pixel favicon image from it. The cropThumbnailImage() method does the work of resizing and cropping in a single swoop while the setFormat() method converts the file to .ico format.
Code is here:
Code is here:
Multiple file upload
Uploading multiple files with PHP requires checking for many possible errors. This script allows the setting of how many upload fields will be displayed in the HTML form and the maximum allowable filesize to upload. The php.ini file also contains an ini option named upload_max_filesize which has a default value of 2M, or two megabytes. This value is taken into consideration also when checking for errors.
The errors are stored in an array called messages and for each file upload a message is generated based on any errors or success of the upload. The form itself was validated with the w3c validator in accordance with the DOCTYPE.
Code with details is:
The errors are stored in an array called messages and for each file upload a message is generated based on any errors or success of the upload. The form itself was validated with the w3c validator in accordance with the DOCTYPE.
Code with details is:
Calculates the age in php
This simple function calculates the age, in years, of a date supplied in any format supported by the strtotime() funcition, which means, basically, any date you can sanely imagine.
Code of function is:
Code of function is:
Twenty Four Hour to Twelve Hour
Recently I have created robotic mailing system for my client. But when it needed to convert a bunch of 24 hour times to 12 hours, the times were in different formats but I needed them in a format that was easily human readable. This function will convert a twenty four hour time to twelve hour time. Feel free to modify it to your own needs.
Code is here:
Code is here:
Convert Unix Timestamp To MySQL Timestamp
PHP date functions such as strtotime() and time() and date() all return a value as a UNIX TIMESTAMP. This is great for date manipulation but becomes a problem when we need a date to INSERT into a MySQL database. The format of a MySQL TIMESTAMP is yyyy-mm-dd hh:mm:ss and to meet this need a simple PHP can be utilized to convert any UNIX TIMESTAMP into a MySQL TIMESTAMP.
Code and use of function is:
Code and use of function is:
Sunday, February 19, 2012
reCaptcha Captcha with PHP and JQuery and CSS
Today I am presenting a code of project for reCaptcha Captcha with PHP and JQuery and CSS. I think all of enjoy it very much.

View Demo: link | Download: Direct
View Demo: link | Download: Direct
Thursday, February 9, 2012
Image converter class in php
Image converter is so important to a designer and developer. When you want to upload images in host you should convert it in a desired file system. I have create a class in php to convert image to all kind of image from source file system. By this you can create a online image converter. If you create online image converter using this code or develop this please mail me.
It is so easy to call as the code:
[php]
<?php
require("class.imageconverter.php");
$img = new ImageConverter("2000.gif","wbmp");
?>
[/php]
All of code is here:
It is so easy to call as the code:
[php]
<?php
require("class.imageconverter.php");
$img = new ImageConverter("2000.gif","wbmp");
?>
[/php]
All of code is here:
Thursday, February 2, 2012
Using PHP/MySQL with Google Maps API

Process for using google map api in php:
-> Create a table in database.
-> A file to create a dynamic xml creator code in php
-> Index file to load and display the map including location indicator
Create table in database:
[php]
CREATE TABLE `markers` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 60 ) NOT NULL ,
`address` VARCHAR( 80 ) NOT NULL ,
`lat` FLOAT( 10, 6 ) NOT NULL ,
`lng` FLOAT( 10, 6 ) NOT NULL ,
`type` VARCHAR( 30 ) NOT NULL
) ENGINE = MYISAM ;
[/php]
Insert the values of attributes in databases table.
as by code:
[php]
INSERT INTO `markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Mr.Insafeta', 'Mohammadpor, Dhaka, Bangladesh', '47.608941', '-122.340145', 'Home');
[/php]
Create database connect page in php (dbinfo.php):
Tuesday, January 31, 2012
Create a URL Shorte by php
Today I have create a code to make short url from a long url. So, you should not use others short url provider service....demo is here

Quick sort in c programming
Root function of quick sort:
[sourcecode language="c"]
void quickSort(int A[] , int left , int right)
{
int pivot , l_hold , r_hold;
l_hold = left;
r_hold = right;
pivot = A[left];
while(left < right)
{
while((A[right] >= pivot) && (left < right))
right--;
if(left != right)
{
A[left] = A[right];
left++;
}
while((A[left] <= pivot) && (left < right))
left++;
if(left != right)
{
A[right] = A[left];
right--;
}
}
A[left] = pivot;
pivot = left;
left = l_hold;
right = r_hold;
if(left < pivot)
quickSort(A , left , (pivot-1));
if(right > pivot)
quickSort(A , (pivot+1) , right);
}
[/sourcecode]
Full code of quick sort:
[sourcecode language="c"]
void quickSort(int A[] , int left , int right)
{
int pivot , l_hold , r_hold;
l_hold = left;
r_hold = right;
pivot = A[left];
while(left < right)
{
while((A[right] >= pivot) && (left < right))
right--;
if(left != right)
{
A[left] = A[right];
left++;
}
while((A[left] <= pivot) && (left < right))
left++;
if(left != right)
{
A[right] = A[left];
right--;
}
}
A[left] = pivot;
pivot = left;
left = l_hold;
right = r_hold;
if(left < pivot)
quickSort(A , left , (pivot-1));
if(right > pivot)
quickSort(A , (pivot+1) , right);
}
[/sourcecode]
Full code of quick sort:
Selection sort in c programming
Root function of selection sort:
[sourcecode language="c"]
void Selection_Sort(int A[] , int N)
{
int i , temp , Loc ;
for(i=0 ; i<(N-1) ; i++)
{
Loc = Minimum(A , i , N);
temp = A[i];
A[i] = A[Loc];
A[Loc] = temp;
}
}
[/sourcecode]
Full code of selection sort:
[sourcecode language="c"]
void Selection_Sort(int A[] , int N)
{
int i , temp , Loc ;
for(i=0 ; i<(N-1) ; i++)
{
Loc = Minimum(A , i , N);
temp = A[i];
A[i] = A[Loc];
A[Loc] = temp;
}
}
[/sourcecode]
Full code of selection sort:
Merge-Sort in C Programming
Main code of merge sort:
[sourcecode language="c"]
void mergeSort(int a[], int n) {
int b[100];
int l = 1;
while(l<n) {
mergePass(a, l, n, b);
mergePass(b, 2*l, n, a);
l = l*4;
}
}
[/sourcecode]
Full code of merge sort:
[sourcecode language="c"]
void mergeSort(int a[], int n) {
int b[100];
int l = 1;
while(l<n) {
mergePass(a, l, n, b);
mergePass(b, 2*l, n, a);
l = l*4;
}
}
[/sourcecode]
Full code of merge sort:
Saturday, January 28, 2012
Animated Share Buttons with CSS & jQuery
Thursday, January 26, 2012
Insertion sort in programming
Function of Insartion sort:
[sourcecode language="c"]
void Insertion_Sort(int A[] , int N)
{
int i , j , temp ;
for(i=2 ; i<N ; i++)
{
temp = A[i];
j = i-1;
while(temp < A[j])
{
A[j+1] = A[j];
j--;
}
A[j+1] = temp;
}
}
[/sourcecode]
[sourcecode language="c"]
void Insertion_Sort(int A[] , int N)
{
int i , j , temp ;
for(i=2 ; i<N ; i++)
{
temp = A[i];
j = i-1;
while(temp < A[j])
{
A[j+1] = A[j];
j--;
}
A[j+1] = temp;
}
}
[/sourcecode]
Thursday, January 19, 2012
Graph Coloring in C Programming
Let G be a graph and m be a given positive integer. We want to whether the nodes of G can be colored in such a way that no two adjacent nodes have the same color yet only m colors are used.
Example:
Let graph G has 5 nodes (a, b, c, d, e) and adjacent matrix is as follows-
* a b c d e
a 0 1 1 0 1
b 1 0 1 0 1
c 1 1 0 1 0
d 0 0 1 0 1
e 1 1 0 1 0
Answer:
Vertex a is color 1
Vertex b is color 2
Vertex c is color 3
Vertex d is color 1
Vertex e is color 3
I have solve this problem in c programming and it run properly in Cygwin.
Source code:
Example:
Let graph G has 5 nodes (a, b, c, d, e) and adjacent matrix is as follows-
* a b c d e
a 0 1 1 0 1
b 1 0 1 0 1
c 1 1 0 1 0
d 0 0 1 0 1
e 1 1 0 1 0
Answer:
Vertex a is color 1
Vertex b is color 2
Vertex c is color 3
Vertex d is color 1
Vertex e is color 3
I have solve this problem in c programming and it run properly in Cygwin.
Source code:
Wordpress "Mylinks" Widgets Creating
Today I have created a wordpres Widget as the name of "Mylinks". By this you can add your won enternal and external links with ultra css.
To use this widget please follow the instructions-
1. Download widget (link).
2. Install it to your wordpress web.
3. Go to admin page -> Setting -> Mylinks or MylinksCentral.
4. Drag the widget into sidebar.
5. In blank box write your xml files link.
The links into xml file as follows code-
To use this widget please follow the instructions-
1. Download widget (link).
2. Install it to your wordpress web.
3. Go to admin page -> Setting -> Mylinks or MylinksCentral.
4. Drag the widget into sidebar.
5. In blank box write your xml files link.
The links into xml file as follows code-
Wednesday, January 18, 2012
Canteen & Department Store Software in C Programming
I have created a software as the name of IST Canteen & Department Store in C programming. The code was run in TC properly. The code of software is open so you can develop it yourself. If you develop it, please mail us.
It is mention that, the mouse play and the option "7.print" work only in memory free system.
Download link: Direct
It is mention that, the mouse play and the option "7.print" work only in memory free system.
Download link: Direct

Monday, January 16, 2012
Image watermark with text and image
Wednesday, January 11, 2012
Create or delete subdomain dynamically using php and cPanel
Introduction
Using this code you can create subdomains in the live server using php under cPanel control panel. There are two functions in this code. One is to create subdomains and the other is to delete a subdomain.
A subdomain is nothing but a folder in the root folder or a folder in any other place in your server domain space under the root folder which will be pointed by a url which you give as name.
Create subdomain code in php
Here is the function to create a subdomain in php.
• First parameter is the subdomain name. Like if you want music.sitename.com then you should provide the word music.
• Second parameter is the user name of your web hosting control panel username. This is the login where you manage your sites files, ftp, database, etc.
• Third parameter is the password of your control panel.
• Fourth parameter is the name of your original or root domain. for example if your domain name is example.com then you have to provide this here without the subdomain name.
Using this code you can create subdomains in the live server using php under cPanel control panel. There are two functions in this code. One is to create subdomains and the other is to delete a subdomain.
A subdomain is nothing but a folder in the root folder or a folder in any other place in your server domain space under the root folder which will be pointed by a url which you give as name.
Create subdomain code in php
Here is the function to create a subdomain in php.
• First parameter is the subdomain name. Like if you want music.sitename.com then you should provide the word music.
• Second parameter is the user name of your web hosting control panel username. This is the login where you manage your sites files, ftp, database, etc.
• Third parameter is the password of your control panel.
• Fourth parameter is the name of your original or root domain. for example if your domain name is example.com then you have to provide this here without the subdomain name.
Tuesday, January 10, 2012
Web, news and image search using google api
Real time search using google api. By this you can search web, news and image from your web through www.google.com api.Click here for demo

Monday, January 9, 2012
eBangla ASCII To Unocode Converter
eBangla converter is the online converter that convert ASCII text (bijoy) to unicode text.
Click here for Demo

Click here for Demo
Friday, January 6, 2012
Gravity registration page
To create a gracity registration page jsut copy this code and save as index.php in your sarver.
Code of index.php
Code of index.php
Convert image to code image by php
[php]
<?php
function image2ascii( $image ){
$ret = '';
$img = ImageCreateFromJpeg($image);
$width = imagesx($img);
$height = imagesy($img);
for($h=0; $h<$height; $h++) // loop for height of image code
{
for($w=0; $w<=$width; $w++) // loop for width of image code
{
$rgb = ImageColorAt($img, $w, $h); // add color in code
$r = ($rgb >> 16 ) & 0xFF;
$g = ($rgb >> 8 ) & 0xFF;
$b = $rgb & 0xFF;
// create a hex value from the rgb
$hex = '#'.str_pad(dechex($r), 2, '0', STR_PAD_LEFT).str_pad(dechex($g), 2, '0', STR_PAD_LEFT).str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
if($w == $width)
{
$ret .= '<br>';
}
else
{
$ret .= '<span style="color:'.$hex.';">*</span>';
}
}
}
return $ret;
}
$image = '123.jpg'; // an image to convert in code
echo image2ascii( $image ); // do the conversion by calling function
?>
[/php]
Click here for Demo
<?php
function image2ascii( $image ){
$ret = '';
$img = ImageCreateFromJpeg($image);
$width = imagesx($img);
$height = imagesy($img);
for($h=0; $h<$height; $h++) // loop for height of image code
{
for($w=0; $w<=$width; $w++) // loop for width of image code
{
$rgb = ImageColorAt($img, $w, $h); // add color in code
$r = ($rgb >> 16 ) & 0xFF;
$g = ($rgb >> 8 ) & 0xFF;
$b = $rgb & 0xFF;
// create a hex value from the rgb
$hex = '#'.str_pad(dechex($r), 2, '0', STR_PAD_LEFT).str_pad(dechex($g), 2, '0', STR_PAD_LEFT).str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
if($w == $width)
{
$ret .= '<br>';
}
else
{
$ret .= '<span style="color:'.$hex.';">*</span>';
}
}
}
return $ret;
}
$image = '123.jpg'; // an image to convert in code
echo image2ascii( $image ); // do the conversion by calling function
?>
[/php]
Click here for Demo
Subscribe to:
Posts (Atom)