Not really a way to log something that fine without writing the PHP to do so.
Although it should be relatively easy on the CWP side to just write a record to a logs table using the existing variables.
PHP has a handy function called get_defined_vars();
Basically, if you dump the contents of that function to a record in filemaker, you'll have a simple log.
The CWP would look pretty simple, like this:
$vars = get_defined_vars();
$record = $fm->newAddCommand('YourLogLayout');
$result = $record->execute();
This would create a new record in your log table, in a "logField" field, using a "YourLogLayout" layout in filemaker. Since you're already doing the find, you're already connecting to filemaker (note you might need to update $fm-> with the name of the object you created as your FM connection).
That might be an easy starting point for you at least. Although if you were able to post your code here, then maybe we could tell you if it's too broad. Chances are it might just be your host that's slow. CWP has always been relatively fast, even returning large data sets. Network lag and server hardware can have an effect on that, and since you've already admitted to using shared hosting, I'm wary to make a suggestion without seeing your code.
Mike, thanks. I may give that code snippet a try. I was afraid of that, that there is no way to track what finds are requested or what data gets sent back without modifying the php. Too bad FM doesn't give a way to do that.
What version of FileMaker Server are you using? I know in 12-14 (I'm guessing this was in earlier versions, but I can't recall at the moment) you can log the Web Publishing requests by turning on Web Publishing logging in the Admin console. This creates a file called "wpe.log" in the Logs folder of your Web Publishing server. This log can contain the requests passed through the XML interface (which I believe the PHP API uses), including the parameters of the requests.
It's kind of ridiculous to expect that filemaker would have that level of logging for Custom Web Publishing. Just like how in filemaker, you would need to script to go to a log table and create a record of your find request, it's even MORE true in CWP. The PHP is fairly simple, so don't casually write off FM as "too bad it doesn't do ___" because you don't have a full understanding of the code you're trying to augment. If it's mission-critical, then you should hire a consultant that can do the PHP work for you to get you what you need.