Cpanel UAPI remote login stoped working
Hello
I have simple plugin with autologin to remote server from server A to server B
I dont understand why this script stoped working . Any one can help me
[CODE=php]uapi('Variables','get_user_information',array('name' => 'user',));
//print_r ($user); display table
$cpanel_user = $user["cpanelresult">["result">["data">["user">;
// get cp username from table
?>
['url'>;
$cookie_jar = 'cookie.txt';
//print_r($session_url);
curl_setopt($curl, CURLOPT_HTTPHEADER, null); // Unset the authentication header.
curl_setopt($curl, CURLOPT_COOKIESESSION, true); // Initiate a new cookie session.
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie_jar); // Set the cookie jar.
curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie_jar); // Set the cookie file.
curl_setopt($curl, CURLOPT_URL, $session_url); // Set the query url to the session login url.
$result = curl_exec($curl); // Execute the session login call.
if ($result == false) {
error_log("curl_exec threw error \"" . curl_error($curl) . "\" for $query");
// Log an error if curl_exec fails.
}
curl_close($curl);
echo "";
echo "";
?>
Please sign in to leave a comment.
Comments
0 comments