API get weather forecast, and use Fetion API to send SMS to friends
Plus the scheduled task, you can continue to send daily weather forecast to yourself and loved ones ...
5 && Strtolower (substr ($url, 0,5)) = = "https") {curl_setopt ($ch, Curlopt_ssl_verifypeer, false); Curl_setopt ($ CH, curlopt_ssl_verifyhost, false);} if (Is_array ($postFields) && 0 < count ($postFields)) {$postBodyString = ""; $postMultipart = False;foreach ($ Postfields as $k = = $v) {if ("@"! = substr ($v, 0, 1))//Determine if file upload {$postBodyString. = "$k =". UrlEncode ($v). "&"; }else//file upload with Multipart/form-data, otherwise with www-form-urlencoded{$postMultipart = True;}} Unset ($k, $v); curl_setopt ($ch, Curlopt_post, True), if ($postMultipart) {curl_setopt ($ch, Curlopt_postfields, $ Postfields);} Else{curl_setopt ($ch, Curlopt_postfields, substr ($postBodyString, 0,-1));}} $reponse = curl_exec ($ch); if (Curl_errno ($ch)) {throw new Exception (Curl_error ($ch), 0);} else{$httpStatusCode = Curl_getinfo ($ch, Curlinfo_http_code), if (!== $httpStatusCode) {throw new Exception ($reponse , $httpStatusCode);}} Curl_close ($ch); return $reponse;} function Object_to_array ($obj) {$_arr = Is_object ($obj)? Get_object_vars ($oBJ): $obj, foreach ($_arr as $key = + $val) {$val = (Is_array ($val) | | is_object ($val))? Object_to_array ($val): $val; $a rr[$key] = $val;} return $arr;}? >
http://www.bkjia.com/PHPjc/735146.html www.bkjia.com true http://www.bkjia.com/PHPjc/735146.html techarticle API get weather forecast, and use Fetion API, send friends SMS plus scheduled tasks, you can continue to automatically send daily weather forecast to yourself and loved ones ...? php#########