Can you tell me how to know from which server/site I get curl request?
The story is something like that: I have API for some data. Users can get that data using query with API key. But in server (API) side I must detect is that valid key for user who send curl request to my API. How to do that? Did I need some more variables like secret key or something and how to do that?
API is in Laravel5 and use MySQL database.
Maybe it helps, I call curl on this way:
$query['appkey'] = 'some lenght key';
$str = '';
foreach($query as $k => $v)
$str .= $k.'='.$v.'&';
$ch = curl_init();
$url = "http://apiwebsite/api/data?" . $str;
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
curl_close($ch);