Click here to Skip to main content
15,892,298 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Linux Distribution Pin
Albert Holguin14-Nov-11 4:51
professionalAlbert Holguin14-Nov-11 4:51 
AnswerRe: Linux Distribution Pin
Eddy Vluggen14-Nov-11 9:01
professionalEddy Vluggen14-Nov-11 9:01 
GeneralRe: Linux Distribution Pin
Albert Holguin17-Nov-11 9:54
professionalAlbert Holguin17-Nov-11 9:54 
SuggestionRe: Linux Distribution Pin
Mohibur Rashid1-Dec-11 19:44
professionalMohibur Rashid1-Dec-11 19:44 
AnswerRe: Linux Distribution Pin
DigiOz Multimedia5-Dec-11 4:39
DigiOz Multimedia5-Dec-11 4:39 
GeneralRe: Linux Distribution Pin
Albert Holguin5-Dec-11 4:51
professionalAlbert Holguin5-Dec-11 4:51 
AnswerRe: Linux Distribution Pin
loctrice29-Dec-11 17:16
professionalloctrice29-Dec-11 17:16 
QuestionImport Google contacts using Authsub(Secure connection) Pin
Paresh14621-Nov-11 3:31
Paresh14621-Nov-11 3:31 
Hello friends,
I am learning google API I want to retrieve google contacts using Authsub. And second thing is that i want to use secure token. I have X.509 certificate with private key.
In first step I got token but in second step (To get AuthSubSessionToken) I got error : Invalid AuthSub token. Here my code. please, anybody have idea ?
Help me....
PHP
$url = "https://www.google.com/accounts/AuthSubSessionToken";
$token = $token;
$param['sigalg'] = "rsa-sha1";
$nonce = "15948".time()."49418";  // any random no(20 digit)
$param['data'] = "GET https://www.google.com/accounts/AuthSubSessionToken ".time()." ".$nonce;		
$private_key = "MY_PRIVATE_KEY";
		
$kvpairs = array();
foreach ($param as $k => $v) {
array_push($kvpairs, ($k . '=' . $v));
}		
	$query_string = '';
	$query_string = implode('&', $kvpairs);
	$base_string = 'GET'.'&'.$url .'&'.$query_string;
	$param['sig'] =  base64_encode(hash_hmac('sha1', $base_string, $private_key, true));
	uksort($param, 'strcmp');
	$header = 'Authorization: AuthSub token="'.$token.'" ';
        foreach ($param as $k => $v) 
        {
        	$header .= $k . '="' .$v. '" ';
        }
        
        $header = trim($header," ");
	$headers[]= $header;
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
	$responce = curl_exec($ch);
	curl_close($ch);

QuestionHow to debug PHP Memory Leak Pin
Logan Black30-Oct-11 14:17
Logan Black30-Oct-11 14:17 
AnswerRe: How to debug PHP Memory Leak Pin
Logan Black30-Oct-11 16:00
Logan Black30-Oct-11 16:00 
AnswerRESOLVED: How to debug PHP Memory Leak Pin
Logan Black30-Oct-11 17:10
Logan Black30-Oct-11 17:10 
GeneralRe: RESOLVED: How to debug PHP Memory Leak Pin
Mohibur Rashid31-Oct-11 18:01
professionalMohibur Rashid31-Oct-11 18:01 
QuestionProblem receiving arabic emails Pin
Jassim Rahma27-Oct-11 7:38
Jassim Rahma27-Oct-11 7:38 
AnswerRe: Problem receiving arabic emails PinPopular
Graham Breach27-Oct-11 9:26
Graham Breach27-Oct-11 9:26 
QuestionHow to make a Cloud text from database Pin
Jassim Rahma26-Oct-11 10:58
Jassim Rahma26-Oct-11 10:58 
AnswerRe: How to make a Cloud text from database Pin
User 171649226-Oct-11 11:39
professionalUser 171649226-Oct-11 11:39 
QuestionFacebook-Like modal box Pin
Jassim Rahma25-Oct-11 6:26
Jassim Rahma25-Oct-11 6:26 
AnswerRe: Facebook-Like modal box Pin
Mohibur Rashid25-Oct-11 15:40
professionalMohibur Rashid25-Oct-11 15:40 
Questionsignature_invalid in Google API Pin
Paresh146225-Oct-11 2:36
Paresh146225-Oct-11 2:36 
AnswerRe: signature_invalid in Google API Pin
Niall Barr26-Oct-11 3:21
professionalNiall Barr26-Oct-11 3:21 
Questiondata was not displayed in the application in the correct format. Pin
Honeyboy_2025-Oct-11 1:01
Honeyboy_2025-Oct-11 1:01 
AnswerRe: data was not displayed in the application in the correct format. Pin
cjoki4-Nov-11 10:30
cjoki4-Nov-11 10:30 
QuestionBest Practices - mysql calls Pin
Dwayner7920-Oct-11 13:59
Dwayner7920-Oct-11 13:59 
AnswerRe: Best Practices - mysql calls Pin
Mohibur Rashid21-Oct-11 0:02
professionalMohibur Rashid21-Oct-11 0:02 
GeneralRe: Best Practices - mysql calls Pin
Dwayner7923-Oct-11 7:40
Dwayner7923-Oct-11 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.