SUNIWAY

Bill inquiry



$api_username, 'ipassword' => $api_password, 'username' => $account_number ); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === FALSE) { die('Error occurred'); } $response = json_decode($result, true); if ($response['errcode'] == 0 && isset($response['list'][0])) { $user_data = $response['list'][0]; $state_memo = htmlspecialchars($user_data['state_memo']); $product_name = htmlspecialchars($user_data['product_name']); $product_price = htmlspecialchars($user_data['product_price']); $balance = htmlspecialchars($user_data['balance']); $begin_time = htmlspecialchars($user_data['order_info']['begin_time']); $finish_time = htmlspecialchars($user_data['order_info']['finish_time']); $begin_time_formatted = date('Y-m-d', $begin_time); $finish_time_formatted = date('Y-m-d', $finish_time); $result_html = "
Balance:$balance
Account Status:$state_memo
Package nam:$product_name
Package amount:$product_price
Starting time:$begin_time_formatted
End Time:$finish_time_formatted
"; } else { $result_html = "
Package information not found.
"; } $result_html .= ""; } ?> Query account number information
Loading...