Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2007, 11:44 AM
Kaitlyn2004 Kaitlyn2004 is offline
 
Join Date: Jul 2006
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Set session outside vB

I have a whole bunch of systems which integrate with vB but they still require you to log in separately.

Is there a way to set minimum session data to "log in" to vB? I know there is tons in the session array but can i set just a few to have them be logged in?
Reply With Quote
  #2  
Old 09-26-2007, 11:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$password md5(md5($password) . $salt);

setcookie(COOKIE_PREFIX 'userid'$useridtime() + 14400);
setcookie(COOKIE_PREFIX 'password'md5($password $license), time() + 14400); 
Reply With Quote
  #3  
Old 09-26-2007, 12:33 PM
Kaitlyn2004 Kaitlyn2004 is offline
 
Join Date: Jul 2006
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
PHP Code:
$password md5(md5($password) . $salt);

setcookie(COOKIE_PREFIX 'userid'$useridtime() + 14400);
setcookie(COOKIE_PREFIX 'password'md5($password $license), time() + 14400); 
What about just for the session?
Reply With Quote
  #4  
Old 09-26-2007, 08:01 PM
ianskate ianskate is offline
 
Join Date: Dec 2002
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah that doesnt tell you anything about setting the session. im doing the same thing currently, and just setting the cookies for userid and pw doesnt do much, vBulletin still thinks you arent logged in.

you need a bbsessionhash cookie which matches the session hash found in a row created in the _session table. unfortunately, vb has a very complex way of creating the id hash/sessionid. ive been searching the forums literally all day and pleanty of people talk about it, but no one shows how its actually done. so im resorting to digging through the source in order to find it. so far ive at least found away to create the idhash in the session table. Im having problems figuring out all the variables used in the sessionhash itself.
Reply With Quote
  #5  
Old 09-27-2007, 12:44 AM
Dudsmack's Avatar
Dudsmack Dudsmack is offline
 
Join Date: Aug 2006
Location: Saint Louis, USA
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ianskate View Post
ive at least found away to create the idhash in the session table.
How do you generate the idhash?


The session hash is read from the cookie bbsessionhash - I know that's not how it's made but I hope that helps.
Reply With Quote
  #6  
Old 01-09-2008, 06:58 PM
reebosak reebosak is offline
 
Join Date: Oct 2005
Location: Mountain View, CA
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dudsmack View Post
How do you generate the idhash?
PHP Code:
$idhash md5$_SERVER['HTTP_USER_AGENT'] . $subnet ); 
where $subnet is the class C network of the remote IP that vbulletin sees.

for example:
My IP : 192.168.1.111
$subnet will be 192.168.1
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03985 seconds
  • Memory Usage 2,214KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete