2013-04-04 35 views

回答

0

試試這個(與你的API密鑰形式MongoLab替換myApiKey):

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, "https://api.mongolab.com/api/1/databases?apiKey=myAPIKey"); 
curl_setopt($ch, CURLOPT_USERAGENT, "MongolabBot/1.0"); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
$result = curl_exec($ch); 
curl_close($ch);