Here is the part of the config.php
Code: Select all
if($_SESSION['USERID'] == "")
{
$A = $config['FACEBOOK_APP_ID'];
$B = $config['FACEBOOK_SECRET'];
define('FACEBOOK_APP_ID', $A);
define('FACEBOOK_SECRET', $B);
STemplate::assign('FACEBOOK_APP_ID',$A);
STemplate::assign('FACEBOOK_SECRET',$B);
function get_facebook_cookie($app_id, $application_secret) {
$args = array();
parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);
ksort($args);
$payload = '';
foreach ($args as $key => $value) {
if ($key != 'sig') {
$payload .= $key . '=' . $value;
}
}
if (md5($payload . $application_secret) != $args['sig']) {
return null;
}
return $args;
}
$code = $_REQUEST['code'];
if($code != "")
{
$my_url = $config['baseurl']."/";
$token_url = "https://graph.facebook.com/oauth/access_token?"
. "client_id=" . $A . "&redirect_uri=" . urlencode($my_url)
. "&client_secret=" . $B . "&code=" . $code;
$response = @file_get_contents($token_url);
$params = null;
parse_str($response, $params);
$graph_url = "https://graph.facebook.com/me?access_token="
. $params['access_token'];
$user = json_decode(file_get_contents($graph_url));
$fname = htmlentities(strip_tags($user->name), ENT_COMPAT, "UTF-8");
$femail = htmlentities(strip_tags($user->email), ENT_COMPAT, "UTF-8");
$query="SELECT USERID FROM members WHERE email='".mysql_real_escape_string($femail)."' limit 1";
$executequery=$conn->execute($query);
$FUID = intval($executequery->fields['USERID']);Warning: file_get_contents(): couldn't connect to server in /home/*****/public_html/include/config.php on line 254
Warning: file_get_contents(https://graph.facebook.com/me?access_token=): failed to open stream in /home/*****/public_html/include/config.php on line 254
Thanks. If you need to see more files, please do tell me. If you want to access my webhosting file manager, pm me.
If inappropriate, please delete this thread admin.
