|
|
shabbir
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();
|
|
87 |
33,163 |
|
|
pradeep
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...
|
09-08-2009 01:49 AM
by nwndm
|
18 |
63,152 |
|
 |
pradeep
The in-built array functions allow you to interact with and manipulate arrays in various ways. Arrays are essential for storing, managing, and operating on sets of variables.
Simple and multi-dimensional arrays are supported, and may be either user created or created by another function. There...
|
09-07-2009 06:21 PM
by lrvv
|
7 |
4,002 |
|
 |
pradeep
Introduction
XOR encryption is a trivially simple symmetric cipher which is used in many applications where security is not a defined requirement.Exclusive-OR encryption, while not a public-key system such as RSA, is almost unbreakable through brute force methods. It is susceptible to...
|
|
5 |
6,426 |
|
 |
pradeep
Here's the code to read ID3 tage from a MP3 file
<?php
//Reads ID3v1 from a MP3 file and displays it
$mp3 = "1.mp3"; //MP3 file to be read
|
|
8 |
18,601 |
|
 |
pradeep
While working with currency calculations, we often require to round a number to the nearest 10 or the nearest 50, like 407 should be 410.
I've written a function which will do exactly that, it requires two parameters the number to the round, and the integer to be rounded to. The function is like...
|
|
1 |
6,312 |
|
 |
pradeep
Introduction
ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple Caesar cipher used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has been described as the "Usenet equivalent of a...
|
|
2 |
4,618 |
|
 |
pradeep
Recently, an obscure detail in the way PHP processes strings came to my attention.
This is processed by code that checks for simple lists (like 1. blah 2. blah, or - blah - blah, etc.). However, an innocent call to in_array($x, array('1.', '0.')) had surprising and unexpected results: our...
|
|
1 |
4,204 |
|
 |
pradeep
Introduction
The RGB color model is an additive model in which red, green, and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation ‘RGB’ come from the three primary colors, red, green, and blue and the...
|
|
2 |
8,458 |
|
 |
Mary
Introduction
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...
|
|
22 |
17,062 |
|
|
o0darkEvil0o
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">
|
|
13 |
6,585 |
|
 |
extraweb
password.class.php
<?php
/*
* Simple password generator
define ('PC_MINUS', 0x01);
define ('PC_CAPITAL', 0x02);
define ('PC_NUMBERS', 0x04);
define ('PC_SPACES', 0x08);
|
|
5 |
2,431 |
|
 |
Mary
Introduction
PHP comes with an extensive catalog of date and time functions, all designed to let you easily retrieve temporal information, massage it into a format you require, and either use it in a calculation or display it to the user. However, if you'd like to do something more complicated,...
|
|
5 |
10,221 |
|
|
shabbir
Many websites generate temporary password or some generate the Activiation code for verification of email. They send the mail with that code in it and so If you wonder how they do this here is a function to do this.
Input : - Length of the Random string you wish to generate
Output :- Random...
|
|
6 |
3,219 |
|
 |
pradeep
I was wondering whether i could read the size of a directory using PHP. So i thought of making something which could help me read the size of the directory ,no. of directories and the no. of files in the given diretory.
The function "getDirectorySize" will ignore link/shorcuts to files/directory....
|
|
5 |
19,432 |
|
 |
pradeep
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...
|
|
3 |
15,346 |
|
|
Sanskruti
Repetitive tasks are always a burden to us. Deleting spam email, sealing 50 envelopes, and going to work are all examples of tasks that are repeated. The nice thing about programming is that you can avoid such repetitive tasks with a little bit of extra thinking. Most often these repetitive tasks...
|
|
2 |
2,207 |
|
|
Sanskruti
A trend with a lot of new Web Designers is to blindly go for ASP or JSP for creating dynamic and interactive websites. Why use PHP for server-side scripting? This question comes in mind of a lot of Web Designers, especially in mind of designers/programmers who are only exposed to much hyped server...
|
|
4 |
4,003 |
|
 |
hurricanesoftwares
I am listing tips to improve your PHP code performance. There are few whom you can call as debatable but overall the code performance will surely increase.
Following tips are written to save time and development cost (includes memory too)
If a method can be static, declare it static. Speed...
|
|
12 |
8,717 |
|
|
Kings
PHP can be used for a lot of different things, and is one of the most powerful scripting languages available on the web. Not to mention it's extremely cheap and widely used. However, one thing that PHP is lacking, and in fact most scripting languages are, is a way to update pages in real-time,...
|
|
5 |
7,047 |