[請益] Is it possible to trigger a php file at the moment the
For example,
if a user is accessing an image file on my server, is it possible to execute
another PHP file at the same time?
I want to record the ip, HTTP_USER_AGENT and HTTP_ACCEPT_LANGUAGE of the
users who have accessed this image file. The difficult point is how to
execute (or may say “trigger”) that PHP recording file at the time the user
is accessing the image. I know I can read the content of the image to the PHP
first then output it as an image and record the user's information meanwhile,
but this method may occupy so much memory usage when the size of the image
file is very large. For this reason, is it possible to make the user access
the image file directly but also can trigger another PHP file at the same
time?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 203.136.205.31
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1501358330.A.5B9.html
推
07/30 12:33, , 1F
07/30 12:33, 1F
→
07/30 15:36, , 2F
07/30 15:36, 2F
→
07/30 15:37, , 3F
07/30 15:37, 3F
推
07/30 16:15, , 4F
07/30 16:15, 4F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章