DokuWiki

It's better when it's simple

User Tools

Site Tools


auth:ning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
auth:ning [2013-03-01 09:48]
210.55.240.39 [Installation]
auth:ning [2013-03-01 09:51] (current)
210.55.240.39 [Installation]
Line 16: Line 16:
 Make sure that the file does not contain empty lines at the beginning and at the end, otherwise you will get PHP warnings. Make sure that the file does not contain empty lines at the beginning and at the end, otherwise you will get PHP warnings.
  
-**NOTE**+=== WARNING: Passwords Sent As Plain Text ===
  
-Username and password are sent as plaintext.  To use a secure SSL connection modify checkDomain function by setting $url to use https and adding a user agent to the curl options: +Username and password are sent as plaintext in the example code below 
 + 
 +To use a secure SSL connection modify the checkDomain function by setting $url to use https and adding a user agent to the curl options: 
  
         function checkDomain($domain) {         function checkDomain($domain) {
             $url = "https://$domain/main/external/info?format=serialize";             $url = "https://$domain/main/external/info?format=serialize";
             $curl = curl_init($url);             $curl = curl_init($url);
- 
             curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");   // set user agent to allow SSL to work             curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");   // set user agent to allow SSL to work
 +            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
 +            $result = curl_exec($curl);
 +            if ($result && is_array($info = unserialize($result)) && $info['version']) {
 +                return true;
 +            }
 +            return false;
 +   
  
  
auth/ning.txt · Last modified: 2013-03-01 09:51 by 210.55.240.39