Scipts & Tutorials


Just sharing this currency converter script that I used on my website.
Feel free to modify it based on your needs.
It uses finance.yahoo.com conversion table.

<?php

$from = 'USD'; //US Dollar
$to = 'SAR'; //to Philippine Peso

$url = 'http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s='. $from . $to .'=X';

$handle = @fopen($url, 'r');
if ($handle) {
    $result = fgets($handle, 4096);
    fclose($handle);
}

$array = explode(',',$result);

$a_convert=$array[1];
$a_date=$array[2];
$a_time=$array[3];
$a_date=preg_replace('/"/', ' ', $a_date);
$a_time=preg_replace('/"/', ' ', $a_time);

echo "1 USD <img src=us_ico_flag.jpg>  = $a_convert PHP <img src=ph_ico_flag.jpg> ";
echo "<br> $a_date / $a_time ";
echo "<br><a href=http://finance.yahoo.com/q?s=USDPHP=X>Powered by: Yahoo! Finance</a>";

?>

Just found this very simple & efficient way of validating email address with PHP.
You can use this to replace the usual regular expression email checking.

<?php
$email = "john@doe.com";

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
      echo "Please check your email address";
} else {
      echo "Great! valid email address";
}
?>

Source:

http://www.php.net/filter_var

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>Text word and character counter</TITLE>
<meta name="description" content="Use this handy tool to get a count of the words or characters in a text document.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Shawn Seley -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function CountWords (this_field, show_word_count, show_char_count) {
if (show_word_count == null) {
show_word_count = true;
}
if (show_char_count == null) {
show_char_count = false;
}
var char_count = this_field.value.length;
var fullStr = this_field.value + " ";
var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
var splitString = cleanedStr.split(" ");
var word_count = splitString.length -1;
if (fullStr.length <2) {
word_count = 0;
}
if (word_count == 1) {
wordOrWords = " word";
}
else {
wordOrWords = " words";
}
if (char_count == 1) {
charOrChars = " character";
} else {
charOrChars = " characters";
}
if (show_word_count & show_char_count) {
alert ("Word Count:\n" + "    " + word_count + wordOrWords + "\n" + "    " + char_count + charOrChars);
}
else {
if (show_word_count) {
alert ("Word Count:  " + word_count + wordOrWords);
}
else {
if (show_char_count) {
alert ("Character Count:  " + char_count + charOrChars);
      }
   }
}
return word_count;
}
//  End -->
</script>
</head>

<body>
<table width="62%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr align="left" valign="top">
          <td with="472" width="472"><h1 align="center" class="pad10"><font size="2" face="Arial, Helvetica, sans-serif">
          Word and Character Counter</font></h1>
          <p align="center" ><font size="2" face="Arial, Helvetica, sans-serif">
          Use this handy tool to get a count of the words or characters in a
          text document. It's useful for word counts for article submissions,
          word or character counts for advertising copy, or any time you need to
          know how many words or characters your text contains.</font></p>
          <p align="center" class="pad10"><font size="2" face="Arial, Helvetica, sans-serif">
          NOTE: In order to use the tool your browser must have JavaScript
          installed and enabled.</font></p>
          <div class="pad10">


<hr>

<p align="center"><font size="2" face="Arial, Helvetica, sans-serif">
          Type or paste your text into the form below and click the button to
          get a word and character count.</font></p>
            </div>

                  <div>
                    <form>
            <div align="center"><font face="Arial, Helvetica, sans-serif">
  <textarea cols=40 rows=10 name=x>
  </textarea>
  <br>
  <input type=button value="Count Words and Characters" OnClick ="CountWords(this.form.x, true, true);">
            </font></div>
                  </form>

<p align="center">
<p align="center">&nbsp;</p>
                  </div>
                  </td>
  </tr>
</table>
</body>
</html>

Note: I did not write this script. I just found it on the web. I’m just sharing the script. I used it once on my page.

Thank you.

<?php

// define the base image dir
$base_img_dir = "./";

// $QUERY_STRING =
//  f(3c9b5fa6bc0fa)  img_file
//  w(123|15%)        width of output
//  h(123|10%)        height of output
//  x(123)            max width of output
//  y(123)            max height of output
//  t(jpg|png)        type of output
//  q(100)            quality of jpeg

// find tags
preg_match_all("/\+*(([a-z])\(([^\)]+)\))\+*/", $QUERY_STRING,
                $matches, PREG_SET_ORDER);

// empty array and set regular expressions for the check
$tags = array();
$check = array( "f" => "[0-9a-zA-Z]{13}",
                "w" => "[0-9]+%?",
                "h" => "[0-9]+%?",
                "x" => "[0-9]+",
                "y" => "[0-9]+",
                "t" => "jpg|png",
                "q" => "1?[0-9]{1,2}" );

// check tags and save correct values in array
for ($i=0; $i<count($matches); $i++) {
    if (isset($check[$matches[$i][2]])) {
        if (preg_match('/^('.$check[$matches[$i][2]].')$/',
               $matches[$i][3])) {
            $tags[$matches[$i][2]] = $matches[$i][3];
        }
    }
}

function notfound() {
    header("HTTP/1.0 404 Not Found");
    exit;
}

// check that filename is given
if (!isset($tags["f"])) {
    notfound();
}

// check if file exists
if (!file_exists($base_img_dir.$tags["f"])) {
    notfound();
}

// retrieve file info
$imginfo = getimagesize($base_img_dir.$tags["f"]);

// load image
switch ($imginfo[2]) {
    case 2:     // jpg
        $img_in = imagecreatefromjpeg($base_img_dir.$tags["f"]) or notfound();
        if (!isset($tags["t"])) {
            $tags["t"] = "jpg";
        }
        break;
    case 3:     // png
        $img_in = imagecreatefrompng($base_img_dir.$tags["f"]) or notfound();
        if (!isset($tags["t"])) {
            $tags["t"] = "png";
        }
        break;
    default:
        notfound();
}

// check for maximum width and height
if (isset($tags["x"])) {
    if ($tags["x"] < imagesx($img_in)) {
        $tags["w"] = $tags["x"];
    }
}
if (isset($tags["y"])) {
    if ($tags["y"] < imagesy($img_in)) {
        $tags["h"] = $tags["y"];
    }
}

// check for need to resize
if (isset($tags["h"]) or isset($tags["w"])) {
    // convert relative to absolute
    if (isset($tags["w"])) {
        if (strstr($tags["w"], "%")) {
            $tags["w"] = (intval(substr($tags["w"], 0, -1)) / 100) *
                          $imginfo[0];
        }
    }
    if (isset($tags["h"])) {
        if (strstr($tags["h"], "%")) {
            $tags["h"] = (intval(substr($tags["h"], 0, -1)) / 100) *
                          $imginfo[1];
        }
    }

    // resize
    if (isset($tags["w"]) and isset($tags["h"])) {
        $out_w = $tags["w"];
        $out_h = $tags["h"];
    } elseif (isset($tags["w"]) and !isset($tags["h"])) {
        $out_w = $tags["w"];
        $out_h = $imginfo[1] * ($tags["w"] / $imginfo[0]);
    } elseif (!isset($tags["w"]) and isset($tags["h"])) {
        $out_w = $imginfo[0] * ($tags["h"] / $imginfo[1]);
        $out_h = $tags["h"];
    } else {
        $out_w = $tags["w"];
        $out_h = $tags["h"];
    }
   
    // new image in $img_out
    $img_out = imagecreate($out_w, $out_h);
    imagecopyresized($img_out, $img_in, 0, 0, 0, 0, imagesx($img_out),
               imagesy($img_out), imagesx($img_in), imagesy($img_in));
} else {
    // no resize needed
    $img_out = $img_in;
}

// check for a given jpeg-quality, otherwise set to default
if (!isset($tags["q"])) {
    $tags["q"] = 75;
}

// returning the image
switch ($tags["t"]) {
    case "jpg":
        header("Content-type: image/jpeg");
        imagejpeg($img_out, "", $tags["q"]);
        exit;
    case "png":
        header("Content-type: image/png");
        imagepng($img_out);
        exit;
   default:
        notfound();
}

?>

Note: I did not write this script. I just found it on the web. I’m just sharing the script. I used it once on my page.

Thank you.

#!/bin/bash
ftp -n 192.168.1.1 <<!
user myusername mypassword
bin
prompt
mput *`date +%Y-%m-%d`*
quit
!
#!/bin/bash
find /home/backup_files -name "*.gz" -mtime +7 -mtime -365 -print0 |  xargs -0r rm -f
####################################################

##### ZLIB #####
http://www.gzip.org/zlib/

cd zlib-version
./configure --prefix=/usr/local/zlib
make
make install

####################################################

##### LIBXML #####
ftp://xmlsoft.org/

cd libxml-version
./configure --prefix=/usr/local/libxml --with-zlib=/usr/local/zlib
make
make install

####################################################

##### LIBJPG #####
wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.version.tar.gz

cd jpeg-version
./configure --enable-shared
make
make install
make install-lib
ranlib /usr/local/lib/libjpeg.a

####################################################

##### LIBPNG #####
wget http://puzzle.dl.sourceforge.net/sourceforge/libpng/libpng-version.tar.gz

cd libpng-version
cp scripts/makefile.std ./
cp makefile.std Makefile
make
make test
make intall

####################################################

##### LIBFREETYPE #####
http://freetype.sourceforge.net/download.html

cd freetype-version
./configure --prefix=/usr/local/freetype
make
make intall

####################################################

##### GD LIBRARY #####
http://www.boutell.com/gd/

cd gd-version
./configure --prefix=/usr/local/gd-2.0 --with-png=/usr/local/lib --with-jpeg=/usr/local/lib --with-freetype=/usr/local/freetype
make
make intall

####################################################

##### OPENSSL #####

cd openssl-version
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make
make test
make install

####################################################

##### APACHE #####
http://httpd.apache.org

./configure --prefix=/usr/local/httpd --enable-modules=all --enable-FEATURE --enable-dbd --enable-mime-magic --enable-headers --enable-usertrack --enable-ssl --enable-http --enable-info --enable-cgi --enable-cgid --enable-rewrite --enable-so --enable-force-cgi-redirect --with-ssl=/usr/local

# old configure
./configure --prefix=/usr/local/httpd --enable-modules=all --enable-ssl --enable-so --enable-track-vars --enable-force-cgi-redirect --with-gettext --enable-module=log_referer --enable-module=log_config --enable-module=log_agent --enable-module=mime --enable-shared=info --enable-module=so --enable-shared=ssl --enable-module=ssl --enable-rule=SHARED_CORE

make
make install

cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd

--- SNIP ---
# chkconfig: 2345 55 25
# description: HTTPD
--- END ---

####################################################

##### CREATE SELF-SIGNED SSL CERTIFICATE #####

mkdir /usr/local/httpd/conf/ssl
cd /usr/local/httpd/conf/ssl
openssl genrsa -des3 -out server.key 1034
openssl req -new -key server.key -out server.csr
cp server.key server.key.orig
openssl rsa -in server.key.orig -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

vi /usr/local/httpd/conf/httpd.conf

--- SNIP ---

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

--- END ---

vi /usr/local/httpd/conf/extra/httpd-ssl.conf

--- SNIP ---

SSLCertificateFile "/usr/local/httpd/conf/ssl/server.crt"
SSLCertificateKeyFile "/usr/local/httpd/conf/ssl/server.key"

--- END ---

####################################################

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

##### TOMCAT #####
http://www.opensourcecommunity.ph/apache/jakarta/

tar -zxf jakarta-tomcat-VERSION
cd jakarta-tomcat-VERSION
./configure
make
make install

##### If TOMCAT is already build #####

tar -zxf jakarta-tomcat-VERSION
mv jakarta-tomcat-VERSION /usr/local/tomcat

####################################################

##### TOMCAT CONNECTOR #####
http://www.opensourcecommunity.ph/apache/jakarta/tomcat-connectors/jk

tar -zxf jakarta-tomcat-connectors-jk-VERSION
cd jakarta-tomcat-connectors-jk-VERSION/jk/native
./buildconf.sh
./configure --with-apxs=/usr/local/httpd/bin/apxs
make
make install

##### edit httpd.conf &amp; put the line: #####

vi /usr/local/httpd/conf/httpd.conf

--- SNIP --

# Tomcat Module
Include /usr/local/httpd/conf/mod_jk.conf

--- END ---

##### create mod_jk.conf &amp; put the line: #####

# Tomcat Module
vi /usr/local/httpd/conf/mod_jk.conf

--- SNIP --

# Load mod_jk module
# Update this path to match your modules location
LoadModule    jk_module  modules/mod_jk.so

# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /usr/local/httpd/conf/workers.properties

# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile     /usr/local/httpd/logs/mod_jk.shm

# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)

JkLogFile     /usr/local/httpd/logs/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel    info

# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# Send everything for context /examples to worker named worker1 (ajp13)
JkMount  /examples/* worker1

--- END ---

##### create workers.properties (standard) &amp; put the line: #####

vi /usr/local/httpd/conf/workers.properties

--- SNIP --

workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java
ps=/

worker.list=ajp12, ajp13

worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp12, ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar

worker.inprocess.cmd_line=start
# IBM JDK1.3
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so

worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

--- END ---

####################################################

##### MOD_PYTHON #####
http://www.opensourcecommunity.ph/apache/httpd/modpython/

./configure --with-apxs=/usr/local/httpd/bin/apxs
make
make install

####################################################

##### MOD_PERL #####
http://perl.apache.org/download/index.html

perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs
make
make test
make install

##### edit httpd.conf &amp; put the line #####

vi /usr/local/httpd/conf/httpd.conf

--- SNIP ---

# PERL module
LoadModule perl_module        modules/mod_perl.so

--- END ---

####################################################

##### INSTALL MYSQL #####

tar -zxf mysql-version.tar.gz
mv mysql-version /usr/local/mysql
adduser mysql -d /usr/local/mysql/data -s /bin/false
chown -R mysql.mysql /usr/local/mysql/data*

####################################################

##### POSTGRESQL #####
http://postgresql.net

cd postgresqlVERSION
./configure --prefix=/usr/local/pgsql --without-readline
make
make install

adduser postgres -d /var/lib/pgsql -s /bin/false
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

####################################################

##### PHP XML RPC EPI #####

http://xmlrpc-epi.sourceforge.net/

tar -zxf xmlrpc-epi-version
cd xmlrpc-epi-version
./configure
make
make install

####################################################

##### LIB EXPAT #####

http://expat.sourceforge.net/

tar -zxf expat-version
cd expat-version
./configure
make
make install

####################################################

ln -s /usr/local/sbin/* /usr/sbin/
ln -s /usr/local/bin/* /usr/bin/
ln -s /usr/local/lib/* /usr/lib/
ln -s /usr/local/libexec/* /usr/libexec/
ln -s /usr/local/libexec/* /usr/bin/
ln -s /usr/local/include/* /usr/include/

####################################################

##### PHP 4 AS CGI #####
http://php.net

##### ORIG #####
####./configure --prefix=/usr/local/php4 --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql-dir=/usr/local/mysql --with-pgsql-dir=/usr/local/pgsql --with-pcre-regex=yes --with-config-file-path=/usr/local/etc/php4/cgi --with-curl --with-gd=/usr/local/gd-2.0 --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-pear --with-png-dir=/usr/local/lib --with-libxml-dir=/usr/local/libxml --with-zlib-dir=/usr/local/zlib --enable-force-cgi-redirect --enable-fastcgi --enable-sysvshm=yes --enable-sysvsem=yes --enable-ftp --enable-cli --enable-calendar --enable-discard-path --enable-ctype --enable-pcntl --enable-posix --enable-session --enable-sockets --enable-tokenizer --enable-magic-quotes --enable-mbstring

##### FOR CGI REMOVE APXS2 #####
./configure --prefix=/usr/local/php4 --exec-prefix=/usr/local/php4 --with-config-file-path=/usr/local/etc/php4 --with-mysql-dir=/usr/local/mysql --with-pgsql-dir=/usr/local/pgsql --with-pcre-regex=yes --with-curl --with-gd=/usr/local/gd-2.0 --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-pear --with-png-dir=/usr/local/lib --with-libxml-dir=/usr/local/libxml --with-zlib-dir=/usr/local/zlib --enable-force-cgi-redirect --enable-fastcgi --enable-sysvshm=yes --enable-sysvsem=yes --enable-ftp --enable-cli --enable-calendar --enable-discard-path --enable-ctype --enable-pcntl --enable-posix --enable-session --enable-sockets --enable-tokenizer --enable-magic-quotes --enable-mbstring --with-xmlrpc=/usr/local --with-openssl=/usr/local --with-openssl-dir=/usr/local
make
make install
mkdir -p /usr/local/etc/php4/
cp php.ini-dist /usr/local/etc/php4/php.ini

##### edit httpd.conf &amp; put the line #####

vi /usr/local/httpd/conf/httpd.conf

--- SNIP ---

# comment php4 module if any
#LoadModule php4_module        modules/libphp4.so

# directory index
DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp index.js index.jp index.php5 iindex.php4 index.php3 index.php index.phtml ndex.htm default.htm default.html home.htm

# PHP 4 as CGI
ScriptAlias /php-cgi/ "/usr/local/httpd/php-cgi/"
Action application/x-httpd-php4 "/php-cgi/php4"
AddHandler application/x-httpd-php4 .php4

<directory>
AllowOverride None
Options None
Order allow,deny
Allow from all
</directory>

--- END ---

mkdir /usr/local/httpd/php-cgi
cp /usr/local/php4/bin/php /usr/local/httpd/php-cgi/php4
chown apache.apache /usr/local/httpd/php-cgi/php4
chmod 755 /usr/local/httpd/php-cgi/php4

vi /usr/local/etc/php4/php.ini

##### edit php 4's php.ini &amp; add this line #####

--- SNIP ---

; PHP4 as CGI
cgi.fix_pathinfo = 1 ; needed for CGI/FastCGI mode

--- END ---

####################################################

##### PHP 5 AS MODULE #####
http://php.net

./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-pcre-regex=yes --with-config-file-path=/usr/local/etc/php5/ --with-curl --with-gd=/usr/local/gd-2.0 --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-pear --with-png-dir=/usr/local/lib --with-libxml-dir=/usr/local/libxml --with-zlib-dir=/usr/local/zlib --enable-force-cgi-redirect --enable-fastcgi --enable-sysvshm=yes --enable-sysvsem=yes --enable-ftp --enable-cli --enable-calendar --enable-discard-path --enable-ctype --enable-pcntl --enable-posix --enable-session --enable-sockets --enable-tokenizer --enable-magic-quotes --enable-mbstring --with-xmlrpc=/usr/local --with-openssl=/usr/local --with-openssl-dir=/usr/local
# Old configure
#./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-pcre-regex=yes --with-config-file-path=/usr/local/etc/php5/ --with-curl --with-gd=/usr/local/gd-2.0 --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-pear --with-png-dir=/usr/local/lib --with-libxml-dir=/usr/local/libxml  --with-zlib-dir=/usr/local/zlib --enable-force-cgi-redirect --enable-fastcgi --enable-sysvshm=yes --enable-sysvsem=yes --enable-ftp --enable-cli --enable-calendar --enable-discard-path --enable-ctype --enable-pcntl --enable-posix --enable-session --enable-sockets --enable-tokenizer --enable-magic-quotes --enable-mbstring
make
make install
mkdir -p /usr/local/etc/php5/
cp php.ini-dist /usr/local/etc/php5/php.ini

vi /usr/local/httpd/conf/httpd.conf

##### edit httpd.conf &amp; put the line: #####

--- SNIP ---

# directory index
DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp index.js index.jp index.php5 iindex.php4 index.php3 index.php index.phtml ndex.htm default.htm default.html home.htm

# PHP5 as module
AddType application/x-httpd-php .php .php5 .php3 .phtml
AddType application/x-httpd-php-source .phps

--- END ---

ln -s /usr/local/php5/bin/* /usr/bin
ln -s /usr/local/php5/lib/* /usr/lib
ln -s /usr/local/php5/include/* /usr/include

####################################################

##### PHP XML RPC #####
http://phpxmlrpc.sourceforge.net/

cd  xmlrpc-version
vi Makefile

--- SNIP ---

PHP=/usr/local/bin/php
PHPINCLUDEDIR=/usr/local/php5/lib

--- END ---

make install
<html>
<head>
<title>MD5 password generator</title>
</head>
<body>
<h2>MD5 password generator</h2>

<?php
import_request_variables('P');

if($pw)
{
        echo "The encrypted version of <b>$pw</b> is:<br>";
        echo "<br><tt>" . strtoupper(decrypt_md5($pw)) . "</tt>";
}
?>
<p>
<form name="pw" method="post">
Enter a password to encrypt:<br>
<input type="text" name="pw">
<br>
<input type="submit" value="Submit">
</form>
<p>
<a href="md5.php.txt">View the source of this page</a>

</body>
</html>

Note: I did not write this script. I just found it on the web. I’m just sharing the script. I used it once on my page.

Thank you.

Next Page »