📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
system
/
linkedinlogin
📝
process.php
← Geri Dön
<?php session_start(); include_once("config.php"); include_once("LinkedIn/http.php"); include_once("LinkedIn/oauth_client.php"); if (isset($_GET["oauth_problem"]) && $_GET["oauth_problem"] <> "") { // in case if user cancel the login. redirect back to home page. $_SESSION["err_msg"] = $_GET["oauth_problem"]; header("location:index.php"); exit; } $client = new oauth_client_class; $client->debug = false; $client->debug_http = true; $client->redirect_uri = $callbackURL; $client->client_id = $linkedinApiKey; $application_line = __LINE__; $client->client_secret = $linkedinApiSecret; if (strlen($client->client_id) == 0 || strlen($client->client_secret) == 0) die('Please go to LinkedIn Apps page https://www.linkedin.com/secure/developer?newapp= , '. 'create an application, and in the line '.$application_line. ' set the client_id to Consumer key and client_secret with Consumer secret. '. 'The Callback URL must be '.$client->redirect_uri).' Make sure you enable the '. 'necessary permissions to execute the API calls your application needs.'; /* API permissions */ $client->scope = $linkedinScope; if (($success = $client->Initialize())) { if (($success = $client->Process())) { if (strlen($client->authorization_error)) { $client->error = $client->authorization_error; $success = false; } elseif (strlen($client->access_token)) { $success = $client->CallAPI( 'http://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,location,picture-url,public-profile-url,formatted-name)', 'GET', array( 'format'=>'json' ), array('FailOnAccessError'=>true), $user); } } $success = $client->Finalize($success); } if ($client->exit) exit; if ($success) { //$_SESSION['loggedin_user_id'] = $user_id; $_SESSION['loggedin_user_id'] = mt_rand(10,99999); $_SESSION['user'] = $user; } else { $_SESSION["err_msg"] = $client->error; } header("location:index.php"); exit; ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula