计算来自用户的cURL请求

I have a website that sends out curl requests to other places, it also has a login system. Is there anyway to log how many curl requests are being sent from one user account?

Thanks

Create a count function and execute it every time the user does a cURL request:

<?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

}

?>