0
Count distinct records or values and display it using mysql and php
This tutorial shows you how to count unique records with mysql and display it using php. Very simple to understand.
This line
count(<COLUMN_NAME>) AS count_me
simply means that the count value is assigned to variable count_me and we...
Change webpage title dynamically using jquery
This is a simple script that will change the webpage title dynamically using jquery.
Customize it according to your requirement.Jquery knowledge is essential to understand the code below. Any doubts do get back to me Happy Coding!!!!
<title>Title...
Redirect webpage using php
Redirect webpage after a specific time delay using php.We have html code for redirecting one webpage to another.But here we have php for doing the same. We can even give a delay of our choice inside the code. Grab the code here.
< ?php header("refresh:3;url=redirected.htm");?>
Put...
Zoom in and zoom out image using jquery
This scripts demonstrates how to Zoom in and zoom out image using jquery when you move mouse over the image.
<title>Move mouse on image to Zoom In and Zoom Out</title>
<script type="text/javascript" src="http://demo.mistonline.in/jquery-1.2.3.min.js"></script>
<script...
Read text file reverse using php
Read text file reverse using php
$file = file('text.txt');
$read_rev = array_reverse($file);
$count=0;
foreach ($read_rev as $dis_line) {
print_r($dis_line);
echo "<br />";
}
Demo
VN:F [1.9.13_1145]please wait...Rating: 2.0/10...
Send mail to admin or website owner when ever the logs show 404 or 500 or 401 or 400 error codes
Send an mail to admin or website owner when ever the logs show 404 or file not found error.This script can be used as a cron and is run on everyday basis to get all the details in your email.You can modify the code URI accordingly to get different...
Date in title bar using php
This is a simple script that appends date inside the html title tag.
<title>Today is < ?php print date("l"); print(", "); print date("d/M/y");?></title>
VN:F [1.9.13_1145]please wait...Rating:...
Setup a smtp server on your localsystem or server using hmailserver and send email
Setup a smtp server on the system, if you are running on windows use hmailserver and configure it and send any number of mails.
DOWNLOAD HMAIL SERVER HERE
a)Select the default...
Replace a string in a text or php file and save it using php
Replace a string in a text or php file and save it using php. A very simple example.Here test_file.php is the php file i am using to replace ip address inside that.
//read the entire string
$str=implode("",file('../test_file.php'));
$fp=fopen('../test_file.php','w');
//replace...
Get the MAC address of the system using php
Get the MAC address of the system using php.
ob_start();
system('ipconfig /all');
$mycom=ob_get_contents(); // Capture the output into a variable
ob_clean();
$findme = "Physical";
$pos = strpos($mycom, $findme);
$macp=substr($mycom,($pos+36),17);
echo...
Get the public IP address of the system not the default ip using php
Get the ip address of the system [usually assigned by ISP], the public ip address using php.
ob_start();
system('ipconfig /all');
$mycom=ob_get_contents(); // Capture the output into a variable
ob_clean();
$findme = "IP Address";
$pos...
Agree Before Entry Using Javascript
Agree before entry using Javascript,with button disable functionality,that means if you agree, you can enter your name. But, if you disagree, you will not be able to enter or edit your name. When you disagree, the box is ‘locked.’...
Find screen resolution and redirect the user using javascript
This script helps you to find screen resolution of a client or user and redirect to a webpage using simple
<script LANGUAGE="JavaScript">
function resolution_finder() {
var url640x480 = "http://www.yahoo.com";
var...
