编辑代码

<?php 
function curls($url, $data_string) {

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

 

    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'X-AjaxPro-Method:ShowList',
        'User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36')
        )
        ;

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

    $data = curl_exec($ch);

    curl_close($ch);

    return $data;

}

 

 $get_url = 'https://testapi.wlhulian.com/api/v1/takeaway/store/balance';

 

 $post_str = '{"sign": "625c69e298b2bc042b1bbf0a6338e427","appId": "677e553a60b298e969584a55","data": "{\"storeId\":\"01f05a4d4057465f82b4e5b58e12f35c\"}","timestamp": 1738229345880,"nonce": "1738229345961","storeId": "01f05a4d4057465f82b4e5b58e12f35c"}';

 

 $post_datas = curls($get_url, $post_str);

 echo '=========';
//echo phpinfo();
 
 echo '+++';