 |
Creating dynamic XML with PHP
When working with XML-based applications, developers often find themselves facing the requirement to generate XML-encoded data structures on the fly. Examples of this include an XML order template based on user input in a Web form, or an XML representation of a...
By Mary
Last Message By Scripting
|
7 17,648 |
 |
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,...
By Mary
Last Message By gkumar
|
5 17,540 |
 |
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,882 |
 |
This is a guide, you will not have a stand-alone effect or file by the end of this guide, but you will - hopefully - have an understanding of the Unix timestamp that allows you a powerful form of managing your PHP applications.
Note: This guide expects the reader to have an understanding on how...
By Mary
|
0 11,141 |
 |
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,882 |
 |
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,614 |
 |
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,911 |
 |
These functions allow you to get the mean, the median, tell if a number is even or odd, strip an array of all strings and characters, and provide probability. The mean function works well if your trying to implement a rate system. just filter the input values of the array and it will work...
By pein87
Last Message By Scripting
|
1 1,889 |
 |
Bubble sort in this form allows someone to order number arrays from lowest number to highest number and vice verse. This article serves the purpose of providing the bubble sort algorithm for use in php. I found a tuts @ active.tutsplus and I used it as a base to create a direct port over to php.
...
By pein87
Last Message By pein87
|
5 3,818 |
 |
Allows you to include dynamically a single file, a list of files or a whole directory. No more tedious include statements.
Background
This is designed to be similar to Java's package system but instead uses a directory, file/s or */ALL, and include type(INC, IN_O, REQ, REQ_O). The reason is...
By pein87
|
0 1,478 |
 |
This functions solves the problem of always writing the same code to check if a get or post request is set or not.
Background
I created this because I was tired of the extra code needed just to see if a request variable has the array key set or not. I don't want to use error suppression...
By pein87
Last Message By pein87
|
1 1,966 |
 |
This class is a wrapper for array's that allows you to use oop to create and manage an array
Background
This class is inspired by Java and C#'s array class.
The Code
If you'd like to use oop to manage an array this class is meant to provide a data type of sorts for that effort.
By pein87
|
0 913 |
 |
Creates a class that acts as a string wrapper similar to Java and C#.
Background
Php doesn't do types so I created a class to act as a wrapper to provide a faux type for strings
The Code
The code is designed so that you can create text variables which have there own methods that you...
By pein87
|
0 934 |
 |
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,479 |
 |
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,273 |
 |
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,680 |
 |
PDO or PHP Data Objects is a data abstraction layer, i.e. it provides uniform methods to access different types of databases, as a result switching between or moving to a different database system is relatively easier. So, in simple language the code to access a SQLite db will also work for MySQL...
By pradeep
Last Message By coderzone
|
1 1,481 |
 |
Memcached is a high-performance open-source caching solution, generally used to improve web application performance by avoiding round-trips to RDBMS, to know more about memcached read Faster Webapps With Memcached.
In this article we'll discuss about installing and using memcached in PHP. A PHP...
By pradeep
|
0 1,738 |
 |
PHP 4.0.2 onwards libcurl support was added in PHP, libcurl is a free client library initially written by Daniel Stenberg which allows us to communicate with servers using a variety of protocols like HTTP,HTTPS,FTP,SMTP,LDAP, etc. In this article we'll be looking at enabling libcurl support in...
By pradeep
Last Message By jeeva1388
|
1 5,076 |
 |
Parsing HTML has always been a tough cookie even for seasoned programmers, but nowadays parsing HTML is extensively used for scraping websites, crawling, error detection websites, and many other useful purposes. In this article we'll be looking into parsing HTML using PHP, for this purpose I...
By pradeep
|
0 1,004 |