auth:ning
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
auth:ning [2012-11-10 14:30] – [Code] 95.161.18.3 | auth:ning [2013-03-01 09:51] – [Installation] 210.55.240.39 | ||
---|---|---|---|
Line 15: | Line 15: | ||
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. | ||
+ | |||
+ | === WARNING: Passwords Sent As Plain Text === | ||
+ | |||
+ | 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) { | ||
+ | $url = " | ||
+ | $curl = curl_init($url); | ||
+ | curl_setopt ($curl, CURLOPT_USERAGENT, | ||
+ | curl_setopt($curl, | ||
+ | $result = curl_exec($curl); | ||
+ | if ($result && is_array($info = unserialize($result)) && $info[' | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | |||
+ | |||
===== Code ===== | ===== Code ===== |