T4VN is an online PHP Help community that provides PHP Tutorials, PHP Examples, PHP Scripts, PHP Support
    HOME  |  HOSTING COUPON  |  TEMPLATE  |  PHP SCRIPTS  |  LINK TO US  |  LINK  |  REGISTER | CONTACT
::: Member Login :::
 Username
 Password
 
Forgot your password ?
::: PHP Tutotal :::
  PHP Basic (7)
  PHP Advanced (4)
  PHP Database (2)
  Coding Step By Step (8)
  PHP and AJAX (0)
::: PHP Example :::
  Arrays (1)
  Code Highlighters (3)
  Database Functions (12)
  Date & Time (5)
  E-Mail (6)
  Forms (5)
  Guestbooks (1)
  Logging (2)
  Miscellaneous (10)
  Password Generators (3)
  Randomizers (3)
  String Manipulation (10)
  User Authentication (6)
::: Search On T4VN :::
::: T4VN Statistics :::
  PHP Scripts : 61
  PHP Example : 67
  PHP Tutorials : 21
  PHP News : 93
  Total Coupon : 36
  Other Tutorials :
  Member : 209
  Visitor Online : 2
  Today Visit: 303
  Total Visitor : 262313
  Most Online : 31
::: Sponsored Links :::

PR 4 For This Webpage
Home Today :

Security Image

Author : imortat

Creates a Secured Image...Anti-Spamming Technique

PHP Example :

<?
//First u will need a code which creates random chaRATERS
// i dont remember where i got this code,but thanks anyway...

function assign_rand_value($num)
{
// accepts 1 - 36
  
switch($num)
  {
    case 
"1":
     
$rand_value "a";
    break;
    case 
"2":
     
$rand_value "b";
    break;
    case 
"3":
     
$rand_value "c";
    break;
    case 
"4":
     
$rand_value "d";
    break;
    case 
"5":
     
$rand_value "e";
    break;
    case 
"6":
     
$rand_value "f";
    break;
    case 
"7":
     
$rand_value "g";
    break;
    case 
"8":
     
$rand_value "h";
    break;
    case 
"9":
     
$rand_value "i";
    break;
    case 
"10":
     
$rand_value "j";
    break;
    case 
"11":
     
$rand_value "k";
    break;
    case 
"12":
     
$rand_value "l";
    break;
    case 
"13":
     
$rand_value "m";
    break;
    case 
"14":
     
$rand_value "n";
    break;
    case 
"15":
     
$rand_value "o";
    break;
    case 
"16":
     
$rand_value "p";
    break;
    case 
"17":
     
$rand_value "q";
    break;
    case 
"18":
     
$rand_value "r";
    break;
    case 
"19":
     
$rand_value "s";
    break;
    case 
"20":
     
$rand_value "t";
    break;
    case 
"21":
     
$rand_value "u";
    break;
    case 
"22":
     
$rand_value "v";
    break;
    case 
"23":
     
$rand_value "w";
    break;
    case 
"24":
     
$rand_value "x";
    break;
    case 
"25":
     
$rand_value "y";
    break;
    case 
"26":
     
$rand_value "z";
    break;
    case 
"27":
     
$rand_value "0";
    break;
    case 
"28":
     
$rand_value "1";
    break;
    case 
"29":
     
$rand_value "2";
    break;
    case 
"30":
     
$rand_value "3";
    break;
    case 
"31":
     
$rand_value "4";
    break;
    case 
"32":
     
$rand_value "5";
    break;
    case 
"33":
     
$rand_value "6";
    break;
    case 
"34":
     
$rand_value "7";
    break;
    case 
"35":
     
$rand_value "8";
    break;
    case 
"36":
     
$rand_value "9";
    break;
  }
return 
$rand_value;
}

function 
get_rand_id($length)
{
  if(
$length>0
  { 
  
$rand_id="";
   for(
$i=1$i<=$length$i++)
   {
   
mt_srand((double)microtime() * 1000000);
   
$num mt_rand(1,36);
   
$rand_id .= assign_rand_value($num);
   }
  }
return 
$rand_id;


$letters=strtoupper(get_rand_id(6));

//creates your image
$pic=ImageCreate(55,17); 

$col1=ImageColorAllocate($pic,000);
$col2=ImageColorAllocate($pic255255255);
Imagestring($pic5000,$letters$col2);
Imageline ($pic08558$col2);

Imagejpeg($pic,"images/pic.jpg"); 
ImageDestroy($pic);
?> 


Other Example
Easy Simple Password Protector
Guest Login That Uses A Cookie


::: Resources :::
  Links Directory
  Programming 2 3
  Webmaster 2 3
  Web Design 2 3
  Web Hosting 2 3
  Other Links 2 3
  Asian ShowBiz News
  Teach Seo For You
::: New Templates :::




::: Other Tutorials :::
 Program Design

  Powered By T4VN.NET - Version 2.0 - CopyRight © T4VN.NET 2005-2007