vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   problem with the $vbulletin object (https://vborg.vbsupport.ru/showthread.php?t=191573)

ghiboz 09-22-2008 02:35 PM

problem with the $vbulletin object
 
Hi, this is a strange question, but I hope to someone help me to solve..
I explain.. i'm trying to make a thing like a bridge... for the first test I used to retrieve the logged user information...
to do this first thing i created a file test.php in the root of the forum and the code is this:
Code:

require("includes/config.php");
require("global.php");
print_r( $vbulletin->userinfo );

and if I go to my http://forum/test.php the result is the print array, and the vaues are ok...

second step I want check this thing from another place... so I use this code:
Code:

$fp = @fopen( "http://forum/test.php", 'r');
if( $fp )
{
    $html = "";
    while (!feof($fp))
    {
        $html .= fgets($fp, 128);
    }
    fclose( $fp );
}
else
{
    echo "error! page";
}
echo $html;

and also here I have the print array, but here the username is "unregistered" and all is like there's no user registered....
what can I solve this thing?
thanks in advance!

ghiboz

Dismounted 09-22-2008 02:59 PM

"Unregistered" == Guest/Not Logged In User

ghiboz 09-22-2008 03:04 PM

yes, this I understand, but my problem is that the user is registered.....

Marco van Herwaarden 09-23-2008 07:27 AM

Most likely you are calling this script from another domain, and there is no cookie set for this domain.

ghiboz 09-25-2008 04:51 AM

Quote:

Originally Posted by Marco van Herwaarden (Post 1628358)
Most likely you are calling this script from another domain, and there is no cookie set for this domain.

yes, my target is to call from another domain...
is there a chance to make this think working?
thanks mate!

Dismounted 09-25-2008 04:54 AM

You will have to set cookies at the other domain. Cookies are not shared cross-domain for security reasons.

ghiboz 09-25-2008 05:52 AM

hmm thanks... and to do this how can I do??

Dismounted 09-25-2008 07:22 AM

The only way to set cookies is for the user to load a page/image.

ghiboz 09-25-2008 07:27 AM

so, if before to call my page, i load a vbulletin page it works?

my problem is not to set the vbulletin cookies, but read them from another domain!

Marco van Herwaarden 09-25-2008 07:33 AM

That is basic internet security: You can not read cookies from another domain!


All times are GMT. The time now is 02:31 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.01065 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete