0

We have a PHP application running on Apache and want to log all API requests (GET + parameters) made to third party websites. e.g. an API call to an SMS provider.

I have found out how to log GET requests made to our server but not requests made to third party servers.

Log GET requests and querystring in PHP (Apache)

James
  • 1,233
  • 3
  • 13
  • 18
  • If you perform those requests on the server side using `cURL` inside PHP or similar then logging those requests is trivial: you just need to write a log entry yourself. If those requests are done by the client (the browser), then your server does not see those requests at all, so there is no way you can log them. You'd either have to send an explicit log entry to the server using some client side logic (Jacascript), or you have to route those requests through your server, so act as a transparent proxy to the client. – arkascha Jan 03 '19 at 11:21
  • How do you manually write a log entry? – James Jan 03 '19 at 11:28
  • You should start reading the documentation of the tools you use... http://php.net/manual/en/function.syslog.php – arkascha Jan 03 '19 at 11:35
  • 1
    Why dont you just create a log entry before hitting the API? – Penguine Jan 03 '19 at 11:38

0 Answers0