- Timestamp:
- 11/19/10 10:29:23 (18 months ago)
- Files:
-
- 1 modified
-
branches/1.4/libs/SystemInfo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4/libs/SystemInfo.php
r2229 r2230 27 27 { 28 28 /** 29 * Calls external site to provide system info feedback report30 *31 * @return bool true32 */29 * Calls external site to provide system info feedback report 30 * 31 * @return bool true 32 */ 33 33 public function hotaru_feedback($h, $format = 'json') 34 34 { … … 45 45 46 46 return true; 47 } 48 49 50 /** 51 * 52 * @param <type> $query_vals 53 * @param <type> $url 54 * @return <type> 55 */ 56 public function sendApiRequest($h, $query_vals, $url) 57 { 58 // Generate the POST string 59 $ret = ''; 60 foreach($query_vals as $key => $value) { 61 $ret .= $key.'='.urlencode($value).'&'; 62 } 63 64 $ret = rtrim($ret, '&'); 65 66 $ch = curl_init($url); 67 curl_setopt($ch, CURLOPT_HEADER, 0); 68 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 69 curl_setopt($ch, CURLOPT_POSTFIELDS, $ret); 70 $response = curl_exec($ch); 71 curl_close ($ch); 72 73 return json_decode($response, true); 47 74 } 48 75 … … 309 336 public function hotaru_version() { return false; } 310 337 public function plugin_version_getAll() { return false; } 311 public function hotaru_feedback() { return false; }312 338 } 313 339 ?>