Facebook Twitter Reset

PHP Most Potentially Dangerous Feature, Secure It Today PHP Secrets

1. Register Globals When this directive is On, PHP will inject extra variables in the script such as HTML request variables, etc. PHP could inject these sort of variables in a script. The problem with this approach is that a developer cannot...

Speed up wordpress using .htaccess part 2

1 – Protect your WordPress blog from hotlinking Hotlinking is the use of an image from one site into a web page belonging to another site. Many bloggers are hotlinked, and have their bandwidth used on another websites. This very helpful...

How to avoid direct access to a file in php

If you don’t want users to access some files directly from browser then you can simply use following php script on top of such files. Let us take one file named MYFILE.PHP as an example, all you have to do is just add the below code on...

Simple php watermark script

A very simple script that watermarks an image with a PNG file using php.Just save the below script and run it on your browser.Thats it.Make sure of the path [image and thePNG watermark] < ?php //just save this file as <sumname>.php...

Create thumbnail using php and gd library

The following PHP code will create thumbnail images on the fly and since it uses the PHP GD2 library, you will need an installation of PHP with at least GD 2.0.1 enabled.. This is a very simple script and very easy to customise. <?php header (“Content-type: image/jpeg”); $image = $_GET['thumimg']; if(!isset($w) && !isset($h)){  $w...

Using no-cache for Stop Caching in Firefox and Internet Explorer

You can prevent any caching in IE by simply setting this response header: Cache-Control: no-cache Pages that use this header aren’t stored in the cache and IE will always reload them from the server; even if you use the Back button to reach...

How to split a word or sentence delimited with slashes, commas or hyphens

How to split a word or sentence delimited with slashes,commas, dots, or hyphens < ?php // Delimiters may be slash, comma, or hyphen $data = “Welcome to, the world of php”; list($first, $second) = split(‘[/,-]‘, $data); echo...

Find Absolute Path Of A File Or Directory Using PHP

The absolute path for a file or directory is not the same as the URI.  The absolute path on the web server is/home/DIR/Xs/something/mydir/. Here is how to find the absolute path on your web host for a given directory if you can’t find it,...

Pass PHP Value To Javascript

This is a simple script to pass values from our server side language PHP to the client side script JAVASCRIPT. Its pretty simple we have two php files. CONTACT.php and SEND.php in that you can see like  values which we enter in contact.php...

How To Set And Get Cookies Using PHP

Here is a simple code that explains how a cookie is set and retrieved using php. A cookie is set with the following code: setcookie(name, value, expiration) $Month = 2592000 + time(); //this adds 30 days to the current time setcookie(MyVisit,...

Fix 500 Internal Server Error In WordPress

Hi Visitors, Two days before i experienced a 500 intenal server error while posting topics and editing my existing topics.I was really disappointed to see that coz if i am unable to post a new topic there is no use in retaining this website,...

Change background color using php for a webpage

This is a very simple script that will dynamically change the background color of a webpage using simple php script.Just copy an paste the script below. <html> <head> <title>Background Colors change based on the day of the...

Simple Code To Set And Retrieve Cookie Using PHP

Setting a cookie using PHP <?php $expire=time()+60*60*24*30; setcookie(“user”,”Balu”, $expire); ?> <html></html> Retrieve a cookie using php <html> <body> <?php if (isset($_COOKIE["user"])) echo...
Affordable Seo PackagesSeo BlogEdu Backlinks