Skip to content
Advertisement

Hit Counter PHP, TXT, Image and Imagick

Some days Ago I started to create a SaaS Hit counter System, I founded some problems but solved, in the last answer about this I just talked about the problem so no codes have been posted with the solution…

Well, I have 95% created but I need to run the PHP file which contain the script inside the image, I tried to insert some rules inside Htaccess file but got no lucky, Below is the code for who wants to help and use 😉

JavaScript

So each refresh in the page which contains this script, one view summ the counter, everything perfect right? nop.. because I need to embed the output.gif in another domains and need to execute the script each time the .gif get reloaded

So I tried to put this code in my Htaccess but just did an error 500 =/

JavaScript

Heres a print of the Counter working:

counter

Someone knows how can I run my .gif as php?

Advertisement

Answer

For everyone who wants to use, I did this:

  • Add this rules to my root htaccess
JavaScript
  • Add this codes to output.php
JavaScript

And removed:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement