ShibataTim's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
15 (0.02 per day)
Joined:
05-October 12
Profile Views:
460
Last Active:
User is offline Oct 18 2012 06:10 PM
Currently:
Offline

Previous Fields

Country:
JP
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
0
Icon   ShibataTim has not set their status

Posts I've Made

  1. In Topic: Error 404 with php game, but the page is there (ezRPG)

    Posted 15 Oct 2012

    I'm not in debug mode, but I have opened a new help ticket with my host to see if they can resolve the issue. I was hoping that someone would of looked through the code I posted above of the captcha page itself and tell me if there was any errors.
  2. In Topic: Error 404 with php game, but the page is there (ezRPG)

    Posted 15 Oct 2012

    I opened a 'help ticket' to my host provider and they informed me that all of my created directories, files and folders should be placed under a default directory. Once I placed them under said default directory, everything seemed to work beautifully. During the installation of the game I was able to create an admin account, which allowed me to register and enter the game. Seeing that everything worked just fine.

    Unfortunately, when I attempted to register to the game, such as a guest/new member would, the captcha image does not load. A captcha image displays numbers and/or letters to verify that the guest/new member is human and not a bot. Everything else on the game is working beautifully, this is the only issue that I am having now.
  3. In Topic: Error 404 with php game, but the page is there (ezRPG)

    Posted 15 Oct 2012

    So after hours of banging my head against the keyboard(not literally) I finally got the game to work. I can log in and play around, but under further investigation(of course I am going to mess with every page before I release it) ; I attempting to register as a new member. Unfortunately, the 'Captcha' does not load. Here is the code:

    <?php
    define('IN_EZRPG', true);
    
    require_once('init.php');
    
    //$code_length = rand(5,6);
    $code_length = 4;
    $rand_start = mt_rand(0, 250);
    $font = 'static/fonts/Capture_it.ttf';
    $fontSize = 30;
    $padding = 10;
    
    $l1 = strtoupper(createKey(1, 1));
    $l2 = strtoupper(createKey(1, 1));
    $l3 = strtoupper(createKey(1, 1));
    $l4 = strtoupper(createKey(1, 1));
    $verify_string = $l1 . ' ' . $l2 . ' ' . $l3 . ' ' . $l4;
    $real_string = $l1 . $l2 . $l3 . $l4;
    $verify_code = sha1(strtoupper($real_string) . SECRET_KEY);
    
    $_SESSION['verify_code'] = $verify_code;
    
    function makeRBGColor($color, $image)
    {
        $color = str_replace("#", "", $color);
        $red = hexdec(substr($color, 0, 2));
        $green = hexdec(substr($color, 2, 2));
        $blue = hexdec(substr($color, 4, 2));
        $out = ImageColorAllocate($image, $red, $green, $blue);
        return $out;
    }
    
    $wordBox = imageftbbox($fontSize, 0, $font, $verify_string);
    
    $wordBoxWidth = $wordBox[2];
    $wordBoxHeight = $wordBox[1] + abs($wordBox[7]);
    
    $containerWidth = $wordBoxWidth + ($padding * 2);
    $containerHeight = $wordBoxHeight + ($padding * 2);
    
    $textX = $padding;
    $textY = $containerHeight - $padding;
    
    $captchaImage = imagecreate($containerWidth, $containerHeight);
    
    $red = randColor();
    $green = randColor();
    $blue = randColor();
    $backgroundColor = ImageColorAllocate($captchaImage, $red, $green, $blue);
    
    $rred = 255-$red;
    $rgreen = 255-$green;
    $rblue = 255-$blue;
    $textColor = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);
    
    imagefttext($captchaImage, $fontSize, 0, $textX, $textY, $textColor, $font, $verify_string);
    
    $angle = mt_rand(-3, 3);
    $captchaImage = imagerotate($captchaImage, $angle, $backgroundColor);
    
    
    $line = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);
    
    for($i = 0; $i < 10; $i++)
    {
        $xStart = mt_rand(0, $containerWidth);
        $yStart = mt_rand(0, $containerHeight);
        $xEnd = mt_rand(0, $containerWidth);
        $yEnd = mt_rand(0, $containerHeight);
        imageline($captchaImage, $xStart, $yStart, $xEnd, $yEnd, $line);
    }
    
    
    imagefilter($captchaImage, IMG_FILTER_CONTRAST, 1);
    //imagefilter($captchaImage, IMG_FILTER_BRIGHTNESS, 10);
    
    //imagefilter($captchaImage, IMG_FILTER_EDGEDETECT);
    imagefilter($captchaImage, IMG_FILTER_GAUSSIAN_BLUR);
    
    header('Content-Type:image/png');
    ImagePNG($captchaImage);
    ?>
    
    
    
  4. In Topic: Error 404 with php game, but the page is there (ezRPG)

    Posted 6 Oct 2012

    Alrighty, I have downloaded XAMPP and now have it completely installed. I've opened the Control Panel, but that is as far as I have really gotten. I do not know how to access the local server, which should be my computer IP address I believe, or as to where to place the rpg files to run it myself locally; to see if it even works. As you have stated that you have done it yourself and the code does work.

    First time I have ever ran XAMPP so any help would be greatly appreciated. Also I am sorry if this seems like it is taking a lot time to sort out, but these are steps that I have never taken before. But feel rest assured that I greatly appreciate your patience with me and helping me so far.
  5. In Topic: Error 404 with php game, but the page is there (ezRPG)

    Posted 6 Oct 2012

    How does one set up a local server? If I go through this and still can't get it to work, then I might as well quit. As you said that you got it to work x.x

My Information

Member Title:
New D.I.C Head
Age:
24 years old
Birthday:
April 6, 1990
Gender:
Full Name:
Shibata Tim
Years Programming:
2
Programming Languages:
html, took a Computer Networking and Computer Repair courses in College; loved it!

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  shibatatim@hotmail.com

Friends

ShibataTim hasn't added any friends yet.

Comments

ShibataTim has no profile comments yet. Why not say hello?