 |
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...
By Sanskruti
Last Message By ankitasharma
|
6 5,150 |
 |
If we intend to make an image gallery, and we would like to show the thumbails of the images, it wouldn't be a wise idea to show the original images with their height & width modified in the <img> tag, that would result in low image quality & higher download time. The solution to this problem would...
By pradeep
Last Message By marksteven
|
9 7,330 |
 |
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,906 |
 |
This is temperature conversion script, used to convert temperature from Celsius, Fahrenheit, Rankine, and Kelvin.
The Code
Include the script in your php project and call one of the conversion functions with a numeric value as its parameter to get some output. You can convert from Celsius,...
By pein87
Last Message By Seo_Aryan
|
4 2,609 |
 |
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...
By pradeep
Last Message By pein87
|
14 13,976 |
 |
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....
By pradeep
Last Message By shrikrishnatech
|
2 3,675 |
 |
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,873 |
 |
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,427 |
 |
The code snippet below will pick up a random image from the server and sends it to the browser.
Try it out.
<?php
if($_GET){
$folder=$_GET;
}else{
$folder='/images/';
}
//path to image dir
By pradeep
Last Message By pkphp
|
2 4,262 |
 |
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....
By pradeep
Last Message By PradeepKr
|
9 49,346 |
 |
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....
By Deadly Ghos7
Last Message By PradeepKr
|
5 4,295 |
 |
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...
By pradeep
Last Message By avneeshatri
|
3 23,128 |
 |
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,471 |
 |
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...
By hurricanesoftwares
Last Message By johnny.dacu
|
18 25,313 |
 |
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...
By pradeep
Last Message By qforever
|
2 15,732 |
 |
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...
By Mary
Last Message By iglow
|
23 56,826 |
 |
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...
By pradeep
Last Message By cignusweb
|
5 21,939 |
 |
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...
By pradeep
Last Message By LenoxFinlay
|
2 10,618 |
 |
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...
By pradeep
Last Message By LenoxFinlay
|
1 9,433 |
 |
password.class.php
<?php
/*
* Simple password generator
define ('PC_MINUS', 0x01);
define ('PC_CAPITAL', 0x02);
define ('PC_NUMBERS', 0x04);
define ('PC_SPACES', 0x08);
By extraweb
Last Message By gkumar
|
5 4,904 |