0
Zip or Archive a directory using php
This is a simple script that archive or zip the current directory using php. Just copy paste the code and run on your host or path where you need the archive to be created.
You can even pass the path as an argument using GET or POST method.
ini_set("max_execution_time",...
Creating An Image Using PHP
Just Copy And Paste The Code Below you can create
.JPG,.GIF,.PNG
Any thing of you choice
Enjoy Wink
< ?php
create_image();
print "";
function create_image(){
$im = @imagecreate(200, 200) or die("Cannot Initialize new GD image...
Simple Example Of Database Connection Using PEAR In PHP
This is a very simple example that uses a Database connection using pear which is a application repository in PHP.
Create a Database of your choice and run these sql queries in the database.
CR'EATE TABLE mydb_test (
mydb_test_id mediumint(9)...
Finding size of a directory using php
Easy to find the size of a directory using php script
Just copy and paste the code to a file <somename>.php on your server or localhost
$totalsize=0;
function show_dir($dir, $pos=1){
global $totalsize;
if($pos == 1)
echo "<hr...
Randomly read and display values of an xml file using php
This script will show you how to read and display the values of an xml file using php. My demo.xml looks like this
<message><name>Antonio Paulo/name><website>http://mistonline.in</website><comment>Good One</comment><date>1305127910</date><user_ip>2.241.68.95</user_ip><user_agent>Mozilla/5.0...
Speed up wordpress using .htaccess part 1
Very simple method to speed up websites that use wordpress as backend using .htaccess methodology
Add the below stuff whatever i have given in your .htaccess file simple.
gzip files
gzip allows you to compress files, so obviously that means...
File System Reference In PHP
The unlink() function deletes a file.
This function returns TRUE on success, or FALSE on failure.
Syntax
unlink(filename,context)
Parameter
Description
filename
Required. Specifies the file to delete
Example
<?php
$file...
Secure PHP Scripts
Securing your variables
In most versions of PHP, you can access the value of a variable before it is initialized. Consider this simple example:
if ($password == $the_password) {
$logged_in = 1;
}
if ($logged_in == 1) {
// secure...
Display Tags in wordpress
A very simple method to add the tags on to a wordpress theme.Its pretty simple just add the below lines to the file you want it to appear, prefferably SIDEBAR.PHP.This can be easily done using wp_tag_cloud(),
Here the smallest means the...
HTML E-mail Using PHP
There are two varieties of email. Text and HTML. Text email is like regular text messages. HTML email is like viewing a webpage with colors and images. To create the effect of an HTML email, a couple of extra headers must be added.
$to = "admin@mistonline.in";
$subject...
Export mysql tables to excel new version using phpxls pear spreadsheet writer
Export mysql tables to excel new version using phpxls pear spreadsheet Excel Writer, This is very easy and flexible. Other techniques of creating excel sheet may work with Openoffice but will not work mostly with Microsoft excel viewer. So this...
XML Parsing Made Easy
I am going to give you the code required to parse XML easily
usingone file.Just copy and paste the code and customize it
accordinglyAny doubts feel free to contact me.
The first file is the XML file
parse.xml
<?xml version=”1.0″...
Exclamation mark (!) at odd places while using php mail fixed
Hey guys, Today one of my reporting tool was having an issue with its mail content. The tool is suppose to give me report for the previous days management processes done by my users.
I have noticed that in the EMAIL content there were some Exclamation...
