FromHollandWithLove
Junior Member
Hi. 🙂
I have recently set up a Mysql database to store user information from people visiting my site. I use PHP to gather the information and write it to the database ($var_ip = $REMOTE_ADDR; $var_agent = $HTTP_USER_AGENT; etc).
Someone told me there is a better method, namely by calling an image from javascript which is actualy a PHP script. Nedstat uses this method too. Can someone explain the basics of this method, perhaps with some code?
I understand that when calling the picture a lot of information is sent along with the request (in the headers right?). Because i call a PHP script instead of a real picture, the information can be captured by PHP and written to the database.
How do yuu capture that information and assign it to PHP variables?
I have recently set up a Mysql database to store user information from people visiting my site. I use PHP to gather the information and write it to the database ($var_ip = $REMOTE_ADDR; $var_agent = $HTTP_USER_AGENT; etc).
Someone told me there is a better method, namely by calling an image from javascript which is actualy a PHP script. Nedstat uses this method too. Can someone explain the basics of this method, perhaps with some code?
I understand that when calling the picture a lot of information is sent along with the request (in the headers right?). Because i call a PHP script instead of a real picture, the information can be captured by PHP and written to the database.
How do yuu capture that information and assign it to PHP variables?