Old 03-22-2008, 10:24 PM   #1 (permalink)
Pikachu's Flea Collar
 
Join Date: Sep 2006
Posts: 54
Reputation: 10
Default Help with my script PHP!

i am in the middle of making a game and on some pages i want a verifaction so there is no botters but my script isnt working can someone help

<?php

// verrification code script.
require("safe.php");

if($set_value_button){$button_value = $digit;}

$image = imagecreate(120, 30);

$white = imagecolorallocate($image, 0x41, 0x41, 0x41);
$gray = imagecolorallocate($image, 0x66, 0x66, 0x66);
$darkgray = imagecolorallocate($image, 0xFF, 0x99, 0x00);

srand((double)microtime()*1000000);

for ($i = 0; $i < 30; $i++) {
$x1 = rand(0,120);
$y1 = rand(0,30);
$x2 = rand(0,120);
$y2 = rand(0,30);
imageline($image, $x1, $y1, $x2, $y2 , $gray);
}

imagestring($image, 10, rand(15 , 60), rand(7 , 12), $button_value , $darkgray);

header('Content-type: image/png');
imagepng($image);
imagedestroy($image);

?>
the error i get is
Fatal error: Call to undefined function imagecreate() in /home/magicmac/public_html/button.php on line 8

thanks
Rah33m is offline  
Old 03-23-2008, 07:00 AM   #2 (permalink)
McFox Sandwich
 
Join Date: Jul 2006
Posts: 463
Reputation: 10
Default

imagecreate() is not a defined function.
Cj Shadows is offline  
Old 03-23-2008, 03:47 PM   #3 (permalink)
Marios's Mustache Wax
 
Join Date: Feb 2007
Posts: 17
Reputation: 10
Default

Maybe imagecreatetruecolor() ??

Read this article for more info: http://gwphp.feudal-times.net/?p=6
__________________
freenity is offline  
Old 03-24-2008, 03:52 AM   #4 (permalink)
McFox Sandwich
 
Join Date: Jul 2006
Posts: 463
Reputation: 10
Default

Just look at the php manuel for the function you want.
Cj Shadows is offline  
Old 03-24-2008, 07:39 PM   #5 (permalink)
Marios's Mustache Wax
 
Join Date: Mar 2008
Location: US
Posts: 10
Reputation: 10
Default

Make sure you have the necessary dll's. I know for image stuff you'll need php_gd2.dll to be installed in the ext folder of your PHP installation directory.
__________________
[[ http://www.intelligentgear.com/ ]]

Intelligent Gear is a set of online turn based browser games designed for having
strategic fun in combative environments. Check out Gear Combat Arena, or Base Ship Commander.
smartgear is offline  
Old 03-25-2008, 05:17 PM   #6 (permalink)
Pikachu's Flea Collar
 
Join Date: Sep 2006
Posts: 54
Reputation: 10
Default

what should i do if my web host doesnt have them installed? i think thats the problem
Rah33m is offline  
Old 03-26-2008, 07:48 PM   #7 (permalink)
Marios's Mustache Wax
 
Join Date: Mar 2008
Location: US
Posts: 10
Reputation: 10
Default

Quote:
Originally Posted by Rah33m View Post
what should i do if my web host doesnt have them installed? i think thats the problem
You could ask them to install it? Some are nice like that.
__________________
[[ http://www.intelligentgear.com/ ]]

Intelligent Gear is a set of online turn based browser games designed for having
strategic fun in combative environments. Check out Gear Combat Arena, or Base Ship Commander.
smartgear is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0
OnRPG, Copyright ©2003-2011, Game Entertainment Enterprises