0
Simple Ajax with PHP click tracker
This tutorial shows how to track your vistors click using simple php and Ajax To implement the click tracking tool we need to create 2 files:
Demo.html: This file contains the html with the links and the Ajax code.
clickTracker.php: This files...
Warning: session_start(): Cannot send session cookie headers already sent
Some times when you intergrate your existing wordpress blog with an external website or at times when you go for something like
<?php
require_once('body.php');
?>
2.php
<?php
session_start();
?>
in your webpage, you will be getting...
Adding a draggable div along with the cursor using simple javascript
In this tutorial we can see how to add a draggable div along with the cursor using simple javascript.
Only some simple javascript included and you can just copy and paste it in to a webpage you want the draggable content to be displayed.
DEMO
<html>
<head>
<meta...
Expand and collapse toggle div using jquery
This is a very simple tutorial on how to show and hide a division tag or Expand and collapse toggle div using simple jquery.
<script src=”http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js” type=”text/javascript”></script>
<script...
How to get the query string value in perl cgi script
In this tutorial we will see how to get the query string value using very simple perl CGI script.
When we hit a URL from the web browser with a query string say
http://mistonline.in/cgi/data.cgi?program=php
In which program=php is the query...
Include files in php using include, include_once, require or require_once
The Core PHP Constructs for Including Files
There are four core constructs for including files into your PHP scripts. The main objective is for you to create code in separate files and then be able to use that code to include functions, variables...
View webpage source using javascript
If you wanna see your webpage source using javascript here is a simple example just copy and paste the script below to your webpage and press the View Source button.
<form action="#" onsubmit="return getsource();">
<input...
Write data to a page using javascript
Here i will show how to write data to a webpage using simple javascript
<span id="data_write"></span>
<script type="text/javascript">function write_date() {
if (document.getElementById && document.createTextNode)...
Simple Javascript Clock
This is a small and very simple tutorial on how to create a clock for your website using javascript.Just add the below code to the section of your website where you want the clock to be displayed
<span id="clock"></span>
<script...
Auto refresh page with timer using javascript
Actually this javascript program familiar to many Bloggers, have long since javascript is made.The first few minutes so that each of our pages will automatically refresh itself in order to display the new-created post by the blog owner to be...
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...
