|
|
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...
|
|
19 |
90,107 |
|
 |
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...
|
|
18 |
14,071 |
|
 |
pradeep
Introduction
RSS is a family of web feed formats used to publish frequently updated content such as blog entries, news headlines or podcasts. An RSS document, which is called a "feed," "web feed," or "channel," contains either a summary of content from an associated web site or the full text....
|
|
1 |
2,135 |
|
|
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();
|
|
111 |
45,737 |
|
 |
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....
|
06-22-2010 12:43 AM
by loyo
|
8 |
27,567 |
|
 |
shabbir
Let us say you have some images and want to watermark those images with some other gif, jpeg, png images or with some plain text on the fly in PHP.
It actually looks tough but it is very simple. Let us take a real time example of profile picture option we have here at Go4Expert.com where if you...
|
|
1 |
728 |
|
 |
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...
|
|
12 |
5,963 |
|
 |
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...
|
|
4 |
20,934 |
|
|
Deadly Ghos7
Introduction
Actually, this has been taken from my blog(www.sampctricks.blogspot.com) and I re-updated the article for Go4expert. I am myself newbie to programming but still I have included here what I myself practice. This is just a basic guide to prevent basic flaws in your PHP based web apps....
|
|
4 |
1,388 |
|
 |
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...
|
|
2 |
9,115 |
|
 |
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...
|
12-13-2009 07:53 PM
by iglow
|
23 |
24,431 |
|
 |
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 |
8,929 |
|
 |
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 |
25,065 |
|
 |
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 |
6,383 |
|
 |
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 |
5,587 |
|
 |
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 |
12,585 |
|
|
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 |
9,285 |
|
 |
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 |
3,254 |
|
 |
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 |
13,045 |
|
|
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 |
4,507 |