Skip to Content Skip to Menu


Warning: Undefined variable $end_tag_params in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321

Warning: Undefined variable $end_tag_params in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321

CB Login using CURL

  • hasanda
  • hasanda
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
9 years 11 months ago #250023 by hasanda

Warning: Undefined variable $end_tag_params in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321
CB Login using CURL was created by hasanda
Hi All,
First, thank you for the Dev Team for this nice component.

I'm trying to create a php script to login to my joomla site.

[code]

$ch = curl_init();
$curlConfig = array(
CURLOPT_URL => " mysite.com/index.php/register/login ",
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => array(
'username' => 'TS002',
'passwd' => 'TS002',
)
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);

// Get logged in cookie and pass it to the browser
preg_match('/^Set-Cookie: (.*?);/m', $result, $m);
$cookie = explode('=', $m[1]);
setcookie($cookie[0], $cookie[1]);


header("location: mysite.com/index.php ");

[code]

can someone please help me to fire the CB Loging module using CURL

Thank you.
Fernando

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 11 months ago #250032 by nant

Warning: Undefined variable $end_tag_params in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321
Replied by nant on topic CB Login using CURL
What version of Joomla?
What version of CB?

What exactly are you trying to do?

Please Log in or Create an account to join the conversation.

  • hasanda
  • hasanda
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
9 years 11 months ago #250195 by hasanda

Warning: Undefined variable $end_tag_params in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321
Replied by hasanda on topic CB Login using CURL
Hi Nant,
info you required,
Cb Version 1.9
Joomla! 3.0.3 Stable

What im trying to do is :
make php script, that can trigger(login process) the CB loging module in the home page. so the users who run the script do not have to enter the user name and password.

eg : www.myjoomlasite.com/phpscripttocblogin.php?user=foo&passw=bar
if pass the script
goto :
www.myjoomlasite.com/index.php

Thank you
Fernando

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum