SunQuest
           PHP Applications
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Applications

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old January 14th, 2003, 06:38 PM
Smoker Smoker is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 14 Smoker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
phpBB2 userdata

Hi I need the information in the $userdata array. I can get it by using the folowing code.
php Code:
Original - php Code
  1.  
  2.     $phpbb_root_path="./";
  3.  
  4.     define('IN_PHPBB', true);
  5.     include('extension.inc');
  6.     include('common.php');
  7.  
  8.     $userdata=session_pagestart($user_ip, PAGE_PROFILE);

But this will only work from my phpbb root directory otherwise it says hacking attempt. I would like to run somthing likethis from a different location. I dont need the whole user array all i really need is
$userdata["session_logged_in"] and
$userdata["username"]
thanks
-Smoker

Reply With Quote
  #2  
Old January 15th, 2003, 01:42 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: phpBB2 userdata

my quick solution (being too lazy to figure it out why) would be:

1) put that script in phpbb folder.
2) when you need that data from php, chdir() to that foler (from your php script)
3) include('zbb.php') that file
4) chdir() back
5) use $userdata however you like

i would do this, because i don't like reading other's ppl code, and figuring out what the programmer whanted to say ;)

Reply With Quote
  #3  
Old April 18th, 2007, 04:48 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: phpBB2 userdata


I had the same problem, look this line in the header:

$userdata = session_pagestart($user_ip, PAGE_INDEX);

Change PAGE_INDEX for your webside directory or the directory where this file is.

$userdata = session_pagestart($user_ip, "./");

Hope this can help you. Sorry for my bad english.

Vassagus.
vassagus@gmail.com

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Applications > phpBB2 userdata


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway