PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
webservant
Worker
Worker


Joined: Feb 26, 2006
Posts: 206
Location: Springfield, MA

PostPosted: Wed Mar 21, 2007 12:12 pm Reply with quote Back to top

I converted my site which has the NSN Admin Block on the front page. Once RN 2.10 was up, this block still had the old gfx security code. I was able to convert it to captcha like this:

In block-Admin_Login.php find this:
Code:

    mt_srand ((double)microtime()*1000000);
    $maxran = 1000000;
    $random_num = mt_rand(0, $maxran);


And comment it out:
Code:

//    mt_srand ((double)microtime()*1000000);
//    $maxran = 1000000;
//    $random_num = mt_rand(0, $maxran);


Then find this:
Code:

    if (extension_loaded("gd") AND ($gfx_chk == 1 OR $gfx_chk == 5 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
      $content .= ""._AL_CODE.": <img src='index.php?gfx=gfx&random_num=$random_num' border='1' height='20' width='77' alt='"._AL_CODE."' title='"._AL_CODE."'><br>";
      $content .= "Security Code: <input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"><br>";
      $content .= "<input type=\"hidden\" NAME=\"random_num\" value=\"$random_num\">";
    }


And replace it with this:
Code:
   $content .= security_code(array(2,4,5,7), 'stacked');
   $content .= '<br />';
View user's profile Send private message Visit poster's website AIM Address
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3038
Location: United Kingdom

PostPosted: Wed Mar 21, 2007 1:21 pm Reply with quote Back to top

Thank you for sharing this. Very Happy
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum