Log in

View Full Version : Adding a Security Image?



Moh
27-10-2006, 07:37 PM
Hello, How do you add a Security image to a DJ Panel.
Like www.thinkhabbo.com/staff (http://www.thinkhabbo.com/staff)
or
www.clubhabbo.net/staff (http://www.clubhabbo.net/staff)

I Realy need to know how to do this. Can any one help?

Jackboy
27-10-2006, 07:40 PM
What u do is u get it to randomly select a picture from the db.

Then u comfirm the info in db.

Moh
27-10-2006, 07:41 PM
What u do is u get it to randomly select a picture from the db.

Then u comfirm the info in db.
some 1 post a tut plz?

George Morgan
27-10-2006, 07:49 PM
** Removed **

bomb-head (forum moderator) - Please dont avoid the filter.

Moh
27-10-2006, 08:12 PM
www. justf uckinggoogleit .com
no reason to swear!

George Morgan
27-10-2006, 08:15 PM
its a real site

dp_124
27-10-2006, 08:17 PM
You can use make a function to generate a security code from an array of characters. once you have the generated string you are able to use GD to produce an image of it.

Call
27-10-2006, 08:24 PM
Search Image verification script
Thats it.

Moh
27-10-2006, 08:40 PM
iv tried, but they all seam to have errors >:(

George Morgan
27-10-2006, 09:11 PM
Well you must be doing something wrong

dp_124
27-10-2006, 10:12 PM
What errors are you enountering ?

Perhaps your host doesnt have GD enabled.

:Blob
27-10-2006, 10:49 PM
Do you mean like this:

http://www.webshakes.com/Primal/GDSIg/sec.php

http://www.webshakes.com/Primal/GDSIg/sec.php

Dentafrice1
28-10-2006, 04:04 AM
Here is the background you need:

http://www.****************/uploads/6e629385ed.jpg



<?php
session_start();
// make a string with all the characters that we

// want to use as the verification code
$alphanum = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

// generate the verication code
$rand = substr(str_shuffle($alphanum), 0, 5);

// choose a background image
$bgNum = 1;

// create an image object using the chosen background
$image = imagecreatefromjpeg("background$bgNum.jpg");

$textColor = imagecolorallocate ($image, 255, 0, 0);

// write the code on the background image
imagestring ($image, 5, 5, 8, $rand, $textColor);

// create the hash for the verification code

// and put it in the session
$_SESSION['image_random_value'] = md5($rand);

// send several headers to make sure the image is not cached

// taken directly from the PHP Manual

// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");


// send the content type header so the image is displayed properly
header('Content-type: image/jpeg');

// send the image to the browser
imagejpeg($image);

// destroy the image to free up the memory
imagedestroy($image);
?>


http://www.habbonewsiefm.net/HS/random_image.php

Want to hide these adverts? Register an account for free!