vBulletin Modifications

Cookie Question!

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 05-25-2007, 02:10 PM   #1
Junior Member
Join Date: Jun 2005
sodhi is on a distinguished road

Default Cookie Question!

Alright, I've created a PHP based htaccess file, that is required by global.php. This means you obviously have 'no chance' of avoiding entering through the htaccess (at least to my knowledge).

I've decided to extend my functionality of the 'hack' though. I want to be able to put the IP into the vBulletin board settings 'banip', if the user type in a bad htaccess 3 times. Obviously I'd want to save the number of attempte, somehow. I've tried numerous ways, but I can't seem to find out how I set vBulletin vars and retrieve them again?

I've tried vbsetcookie('cookiename', 1)

and then

if(isset($vbulletin->session->vars['cookiename'])) vbsetcookie('cookiename', ($vbulletin->session->vars['cookiename']+1)

And I've even tried using 'regular' sessions thru $HTTP_SESSION_VARS. Nothing works.

Do you have a suggestion (I might've stared myself blind at this)?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 05-25-2007, 03:59 PM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Just to correct a bit of your code;
if(isset($vbulletin->session->vars['cookiename']))
{
vbsetcookie('cookiename', (intval($vbulletin->session->vars['cookiename'])+1));
}




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-25-2007, 04:46 PM   #3
Junior Member
Join Date: Jun 2005
sodhi is on a distinguished road

Default

Right you are.. however, it still does not work. It does not even set the 'htattempts' cookie.

You must first be a registered member to view any code.
This is what print_r($vbulletin->session->vars); gives me.. doesn't look like htattempts is set at all..

Anyone got a clue?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
children answer on the question of marriage Senna Off Topic 1 03-17-2007 11:37 AM
upgrade question! jeneepen General vBulletin Support 2 09-10-2006 06:37 AM
n00b question: how do i run a script ondareal General vBulletin Support 2 03-20-2006 06:53 PM
Newbie Question theinstallguy General vBulletin Support 6 07-07-2005 09:14 AM


All times are GMT -3. The time now is 08:46 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)