 |
Management of files
Manipulating files is a basic necessity for programmers and PHP gives you a great deal of tools for creating, uploading, and editing files. When you are manipulating files you must be very careful because you can do a lot of damage if you do some errors. Common errors include...
By Sanskruti
|
0 7,052 |
 |
Here's a function which will format the passed bytes into KB,MB,GB...appropriately.
function GetSize ($sizeb) {
$sizekb = $sizeb / 1024;
$sizemb = $sizekb / 1024;
$sizegb = $sizemb / 1024;
$sizetb = $sizegb / 1024;
$sizepb = $sizetb / 1024;
if ($sizeb > 1) {$size =...
By pradeep
|
0 2,166 |
 |
How To Find Similar Sounding Words
Let say a condition where we wanted a utility that finds a matches of words which sounds all same. For example, stupid/stpid/stuuupid/sstuuupiid would all have the same soundex code, S313, Soundex is a phonetic algorithm which computes a soundex value for each...
By pradeep
|
0 2,661 |
 |
This script is a simple file based counter. This is meant for sites that do not run a db and instead, use a file and a cookie. It isn't the best I've seen but it's simple. Consider this as a tutorial.
Just create a file called counter.txt and put this where you want to display the...
By pradeep
|
0 4,469 |
 |
If you want to validate a form without submitting it, you can use two methods, one is pure client side JavaScript and the other being a mix of JavaScript and server-side scripting which can be PHP,ASP.JSP,Perl or anything for that matter.
First I will give an example of pure JavaScript...
By pradeep
Last Message By pkphp
|
21 230,744 |
 |
This script adds some basic math functions to php allowing you to get percentages, ratios and other fraction based functions.
Background
I created this because I had a need for some math functions that php does not provide. I also made them for my math class to save on time from having to do...
By pein87
|
0 1,940 |
 |
The below is a code to gauge ur php performance
<?php
function micro_time_val($mytime)
{
$gettime=explode(" ",$mytime);
$msec=(double)$gettime;
$sec=(double)$gettime;
return ($sec + $msec);
By rohitdsouza
Last Message By pradeep
|
8 2,843 |
 |
Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying to implement geo-targeted advertising. This article will show you how.
Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying...
By Mary
Last Message By iglow
|
23 57,162 |
 |
This Code let you take a image search on Google easily and user-friendly.
You can pre-specify image properties: image name or caption, size and dimension rank of image.
Code Here:
<?php
session_start();
$_SESSION=0;
?>
<link href="../../client/style.css" rel="stylesheet" type="text/css">
By o0darkEvil0o
Last Message By shrikrishnatech
|
15 15,932 |
 |
Say if you want to generate graph on your website using data from a data base, you might be wondering how to go about it. Well the best way I would do it is use free PHP GD library.
Here is a class i wrote to generate a graph in a PNG image for me.
class BarGraph
{
var $barWidth;
var...
By pradeep
Last Message By johnny.dacu
|
5 39,573 |
 |
Ill start by giving the code to the guest book then I will give a step by step on what each part does.
<?php
if(isset($_POST) && isset($_POST))
{
if($_POST != "" && $_POST != "")
{
$F_D = getdate();
$FT = $F_D."/".$F_D."/".$F_D;
By vishal sharma
|
0 32,203 |
 |
Haversine Formula
The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides...
By pradeep
|
0 16,706 |
 |
Background
I've needed the header function in php so many times I figured I'd write a tutorial on it. This tutorial should help you do most of the things that the header function is capable of. Simply put, the php header function will send a http header to the browser.
Headers in PHP
If...
By S k
Last Message By pradeep
|
4 3,978 |
 |
Article is about making a simple yet powerful Gallery system using PHP, AJAX and Lightbox
Background
Some days ago i started ma new project im building our site (for the 4th time) :D Thought to do a real difference so everything i needed to code by me. Hope this will help you too.
The...
By ManzZup
Last Message By ManzZup
|
7 7,376 |
 |
In this article we will create file based simple yet successful captcha generator.
3 Major Anti-spamming techniques used?
Mathematical Operation like Random number + Random Number = -> The user must specify the answer
Random word -> User must type the word
Random question -> Obvious one...
By ManzZup
Last Message By donor
|
5 9,864 |
 |
What is MAIL4EVERY1?
After long time, I got this very unusual idea to make something useful :D Basically I got fed up with my web host not allowing mail() feature and so MAIL4EVERY1. Mail4Every1 is a simple script that would allow any one to send emails even if the webhost allows the mail() or...
By ManzZup
Last Message By ManzZup
|
11 3,712 |
 |
If you have PHP4 working on your server, and have heard that PHP5 may screw up things. Here's how to have both running alongside.
#!/bin/sh
# PHP5 CGI Installer for cPanel/WHM Servers
VERSION=5.0.4
cd /usr/src
wget -O php.tbz2...
By pradeep
|
0 3,348 |
 |
The PHP Extension and Application Repository (PEAR) is an open source structured library of packages for PHP developers. These packages provide routines which solve problems PHP developers regularly face: sending structured e-mail (such as an HTML attachment), interacting with different databases...
By pradeep
|
0 9,022 |
 |
Smarty is a templating engine for PHP, it's one of the most popular templating engine used by PHP developers. Using a templating engine helps businesses separate presentation logic & application logic.
Templating, you can say is a way to separate the business logic from the presentation...
By pradeep
|
0 1,708 |
 |
This is a very simple code and hardly requires any explanations. :eek: If you need any put the post here.
functions.php
<?php
function createsessions($username,$password)
{
//Add additional member to Session array as per requirement
session_register();
By shabbir
Last Message By iMustBeAlien
|
133 112,123 |