fetch('https://js.ruseo.cn/api/counter.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: 'YOUR_API_KEY',
action: 'increment',
counter_id: 'my_counter'
})
})
$data = [
'api_key' => 'YOUR_API_KEY',
'action' => 'increment',
'counter_id' => 'my_counter'
];
$ch = curl_init('https://js.ruseo.cn/api/counter.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
import requests
import json
response = requests.post(
'https://js.ruseo.cn/api/counter.php',
headers={'Content-Type': 'application/json'},
data=json.dumps({
'api_key': 'YOUR_API_KEY',
'action': 'increment',
'counter_id': 'my_counter'
})
)
print(response.json())
curl -X POST 'https://js.ruseo.cn/api/counter.php' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"action": "increment",
"counter_id": "my_counter"
}'