I have a list of URLs where I want to limit the daily use for each domain using URL column that contain the full link.
If the number of daily usages exceeds 10 it won't execute the request.
Now I'm doing it like this
$mysqli = new mysqli("example.com", "user", "password", "database");
$query = "SELECT type FROM websites WHERE url=? and date=?";
$stmt = $mysqli->prepare($query);
$stmt->bind_param('ss',$url,$strdate);
$stmt->execute();
$stmt->store_result();
$num_rows = $stmt->num_rows;
The above will limit the daily usage for specific page/full URL link and not by domain.
I want to count the rows in URLs column that contains that domain.