You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
471 B
13 lines
471 B
<?php
|
|
// 发票系统-发票开票 1分钟一次
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, 'http://ljclf.dgyq-water.com/task/InvoiceIssuanceTask/runIssueAnInvoice');
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
$response = curl_exec($ch);
|
|
curl_close($ch);
|
|
// 可以记录日志
|
|
$date = date("H:i");
|
|
$arr = ['08:00','12:00','16:00','20:00'];
|
|
if (in_array($date, $arr)) {
|
|
file_put_contents('api_log.txt', date('Y-m-d H:i:s')." - API called\n", FILE_APPEND);
|
|
}
|