RSS Feed/News Use XF session to verify via curl

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
23,657
Points
823

Reputation:

Hello all.

I'm attempting to verify that the user is logged into their xenforo account via cURL and a C++ application.
I would like to avoid using the API due to the insecure nature of an API key in a compiled file which will be sent to forum members.
So far I've been able to verify the user is logged in when I access this php via the browser I'm logged into.
PHP:

Code:
 XF::start($fileDir);
$app = XF::setupApp('XF\Pub\App');
$app->start();
$user=XF::visitor();

if (!$user->user_id)
{...

Read more

Continue reading...
 
Status
Not open for further replies.
Top