?? ????? ????? ?? ??? v3 ??? ?? ???? ?? ??? ??? ??? ????? ???? ??? ??? ?????
?? ??? ???? ??? ????
//統(tǒng)一下單 public?function?wechartAddOrder($name,$ordernumber,$money,$openid){ ????????$url?=?"https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi"; ????????$urlarr?=?parse_url($url); ????????$appid?=?config('config.appId');//appID ????????$mchid?=?config('config.mchid');//商戶ID ????????$xlid?=?config('config.apiXL');//API序列號(hào) ????????$data?=?array(); ????????$randstr?=?getRanStr(16,false);//隨機(jī)字符串長(zhǎng)度不超過(guò)32 ????????$time?=?time(); ????????$data['appid']?=?$appid; ????????$data['mchid']?=?$mchid; ????????$data['description']?=?$name;//商品描述 ????????$data['out_trade_no']?=?$ordernumber;//訂單編號(hào) ????????$data['notify_url']?=?"https://www.xffly.cn/api/admin/order/wechartCallback";//回調(diào)接口 //??????$data['amount']['total']?=?$money;//金額 ????????$data['amount']['total']?=?1; ????????$data['payer']['openid']?=?$openid;//用戶openID ????????$data?=?json_encode($data);? ????????$key?=?$this->getSign($data,$urlarr['path'],$randstr,$time);//簽名 ????????$token?=?sprintf('mchid="%s",serial_no="%s",nonce_str="%s",timestamp="%d",signature="%s"',$mchid,$xlid,$randstr,$time,$key);//頭部信息 ????????$header??=?array( ????????????'Content-Type:'.'application/json;?charset=UTF-8', ????????????'Accept:application/json', ????????????'User-Agent:*/*', ????????????'Authorization:?WECHATPAY2-SHA256-RSA2048?'.$token ????????);?? ????????$ret?=?curl_post_https($url,$data,$header); ????????return?$ret; ????}
?? ??? ??? ?? ?? ? ????.
//微信支付簽名 public?function?getSign($data=array(),$url,$randstr,$time){ ????????$str?=?"POST"."\n".$url."\n".$time."\n".$randstr."\n".$data."\n"; ????????$key?=?file_get_contents('apiclient_key.pem');//在商戶平臺(tái)下載的秘鑰 ????????$str?=?getSha256WithRSA($str,$key); ????????return?$str; ????}
?? ?? ?????? ?? prepay_id ????
?? ?????? ??? ????? wx.requestPayment ?????? ?????. ??? ?? ????. ??? ??? ?????. ??? ????? ?? ???
??? ????? ??? ?????. Reason
//調(diào)起支付的簽名 public?function?getWechartSign($post){ ????????$data?=?array(); ????????$data['timeStamp']?=?$post['timeStamp']; ????????$data['nonceStr']?=?$post['str']; ????????$data['package']?=?$post['package']; ????????$str?=?config('config.appId')."\n".$data['timeStamp']."\n".$data['nonceStr']."\n".$data['package']."\n"; ????????$key?=?file_get_contents('apiclient_key.pem'); ????????$str?=?getSha256WithRSA($str,$key); ????????return?$str; ????}
??? ?? ??? ?? ????, ?? ??? ?? ???
json ?????. json_decode? ???? ???? ?? ??????. ???? ???? ??? ?????, ??? ?? ???? ?? ? ??? htmlspecialchars_decode? ???? ????????. ??? ??? ??? ? ??? ?? WeChat ??? ??? ???? ????. ?? ??? ???? ?? ???? ??? ? ????.
//微信回調(diào)寫(xiě)入日志文件并返回 ????public?function?writeWechartLog($post){ ????????if(!is_dir("upload/log")){ ???????????mkdir("upload/log",0777,true); ????????} ????????$log?=?fopen("upload/log/wechart.txt",?"a+"); ????????if(is_array($post)){ ????????????$post?=?json_encode($post); ????????} ????????fwrite($log,?$post."\n"); ????????fclose($log); ????????$read?=?fopen("upload/log/wechart.txt",?"r"); ????????fseek($read,?-1,?SEEK_END); ????????$s?=?''; ????????while?(($c?=?fgetc($read))?!==?false)?{ ????????????if?($c?==?"\n"?&&?$s)?break; ????????????$s?=?$c?.?$s; ????????????fseek($read,?-2,?SEEK_CUR); ????????} ????????fclose($read); ????????return?$s;//取剛剛存的最后一條回調(diào)信息 ????}
?? ????. ?? ????? ???, ??? ????? ???. ??? ???? ?? ??????
sodium_crypto_aead_aes256gcm_decrypt ? ??? ??? ????? PHP?? ???? ???? ???
//微信回調(diào)解密 ????public?function?wechartDecrypt($str)?{ ????????$str?=?htmlspecialchars_decode($str,ENT_COMPAT); ????????$post?=?json_decode($str,true); ????????$key?=?config("config.apiv3Key");//商戶平臺(tái)設(shè)置的api?v3?密碼 ????????$text?=?base64_decode($post['resource']['ciphertext']); ????????$str?=?sodium_crypto_aead_aes256gcm_decrypt($text,$post['resource']['associated_data'],$post['resource']['nonce'],$key); ????????return?json_decode($str,true); ????}
?? ?? ?? ??? ?? ? ???? ??? ???
??? ?? ????? ?? ?? ? WeChat ???? ??? json ??? ?? ??? ? ?? ??? ??? ?? ?????. ?? ?? ???? ???? ??? ?? ? ???? ???????. ...
? ??? [??] PHP WeChat ??? WeChat ?? v3 ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP?? ?? ?? ??? ???? ?? ??? ? ???? ?? ??? ???? ?? ??? ???? ???? ????. 1. ?? ?? ??? ?? ??? URL ? ?? ??? ????. 2. UrlenCode? ???? ?? ??? ???????. 3. ? ???? ????? ?? ?? ??? ? ?? ??? ?????. 4. ???? ???? ?? ? ? ??? ??? ??? ??? ?????. 5. ??? ?? ??? ????? ?? ????? OG ??? ???? ?????. 6. XSS ??? ???? ?? ??? ??? ?????. ? ???? ??? ??? ???? ??? ?? ?? ??? ??? ???? ??? ?? ??? ?????.

??? ?? ??? ??? ?? JavaScript? MediareCorder API? ?? PHP ???? ???? ?????. 2. PHP? ???? ?? ??? ???? STTAPI (? : Google ?? Baidu ?? ??)? ???? ???? ?????. 3. PHP? ???? AI ??? (? : OpenAigpt)? ????. 4. ?? ?? PHP? TTSAPI (? : Baidu ?? Google ?? ??)? ???? ??? ?? ??? ?????. 5. PHP? ?? ??? ??? ??? ??? ?? ?? ??? ?????. ?? ????? PHP? ?? ???? ?? ?? ?? ??? ??? ?????.

AI? ??? ??? ?? ?? ? ?? ???? ????? ?? ??? ??????. 1. Baidu, Tencent API ?? ?? ?? NLP ?????? ?? ??? AI ?? ?? API? ??????. 2. PHP? ? ?? guzzle? ?? API? ???? ?? ??? ??????. 3. ?? ????? ?? ?? ??? ???? ???? ???? ??? ??? ? ????. 4. ?? ?? ? ?? ???? ?? PHP-L ? PHP_CODESNIFFER? ??????. 5. ???? ????? ???? ?? ?? ??? ?????? ??? ??????. AIAPI? ??? ? ???, ?? ??, ?? ? PHP ?? ??? ??? ???. ?? ???? PSR ??? ???, ??? ????? ????, ?? ??? ???, ????? ??? ????, X? ???????.

1. ?? ???? ??? ??? ?????? ?? ?? ??? ??, ??? ?? ???? ??? (? : ?? ???, ? ? ??), ?? ??? ?? ???? ???? ? ?? ?? ??? ??? ?? ??? ????????. 2. ?? ??? ??? ?? ? ??? ???? ?? ?? ?? ???? ?? ? ?? AUDIT ?? ??? ??? ? ????? ????? ??? ???????. 3. ?? ?? ??? ?? ??? ???????. Recaptchav3 ???? ??, ??? ?? ?? ?? ?? ??, IP ? ?? ??? ??? ??? ?? ???? ??? ?? ??? ????? ??? ???? ????? ??? ?????.

PHP? AI ??? ??? ?? ????? ??? API? ?? ?????. ??? ??? ????? ? ??? ???? ?????. API ??? ?? ?? ??? ???? ??? ??? ???? ???? ? ????. 2. ?? ?? ???? guzzle ?? curl? ???? HTTP ??? ???, JSON ??? ??? ? ???, API ? ?? ??, ??? ? ?? ??? ???? ??, ??? ?? ?? ? ? ?? ????, ??? ?? ? ?????? ?????. 3. ???? ???? ?? ???? API ??, ?? ? ??? ?? ??, ??? ?? ??, ?? ?? ? ??? ??? ??? ?????. ?? ??? ??? ??? ? ??? ???? Propt ?? ? ?? ?? ??, ??? ?? ? ?? ????, ?? ?? ?? ???? ? ??? ?? ? ???? ????? ?????.

PHP? ?????? ????? ?? ?? ?? ???? ???? ?? ???? ???? ?? ?? ???? ?????. 2. ?? ??? ???? ???? ?? ??? ?? ? ??? ??? ???? ?? API/Webhook ??? ??? ?? ???? ??? ??? ??? ??? ?????. 3. ?? ????? ?? ??, ??/???? ????, ???? ??, ???? ? ??? ?????? ????? ?? ??? ???? ???? ?? Dingtalk, SMS ?? ??? ???? ??? ?????? ???? ?? ? ??? ??? ????? ?? ??? ???? ???????.

PhpisstillRelevantinmodernenterpriseenvironments.1. Modernphp (7.xand8.x)? ??? ??, ??? ??, jitcompilation ? modernsyntax, mateitsuilableforlarge-scalepplications

??? AI ?? ?? ???? ???? PHPSDK? ??????. 2. PHP? ???? FFMPEG? ???? ???? API ?? ?? (? : WAV)?? ?????. 3. ??? ???? ????? ????? API ???? ??? ??????. 4. NLP ??? ???? JSON ??? ???? ???? ?????. 5. ?? ??? ???? ???? ?? ?? ?? ?? ?? ??? ?????. ?? ????? ?? ?? ? ??? ???? ?? ??? ???, ??? ?? ? ??? ???????.
