2015-01-03 67 views
0

我有一个向其他地方发送curl请求的网站,它也有一个登录系统。无论如何要记录从一个用户帐户发送多少个curl请求?计算来自用户的cURL请求

感谢

+0

向我们展示你的代码为卷曲请求和记录系统。在创建cURL请求的代码中,添加日志记录。 – Veve

+0

在用户表中创建一个名为'curl_requests'的列。每当你提出一个cURL请求时,你将这个值增加1。 –

回答

0

创建count函数并执行它的每一个用户做的卷曲请求时间:

<?php 

function count() { 

    $currentAmount = "whatever (integer value)"; // Get from database (e.g. from the field "curl_requests") or text file 

    $newAmount = $currentAmount + 1; 

    set_new_amount($username, $newAmount); // Update to database or text file 

} 

?>