Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3433200
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:32:41+00:00 2026-05-18T07:32:41+00:00

So, i want to do some metrics about the times one image is open,

  • 0

So, i want to do some metrics about the times one image is open, i need to give my users the link of the image but i need to track how many times they open it.

If i give them the link like http://webserver.com/image.png i cant track how many times the images is opened, so i think if i can make a PHP script who streams the binary data when the user calls the link like http://webserver.com/image.php, it maybe works.

In this scenario, i can simple write a metric script to store information like ip and time, but i don’t know how to echo the image in order to show it on the browser. I think that maybe if i open the image in binary mode from the PHP script and then stream that information to the user it will work, but in this area i know nothing.

Some people can say that i can simple do an echo("image.png"); at the end of the script but this won’t work if you think a little more.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:32:42+00:00Added an answer on May 18, 2026 at 7:32 am

    Generally, you will want to tell the browser what type of content to expect, and then send the bytes of the content. For example:

    incrementHitCounter();
    logIP();
    
    // Dear browser, a PNG file is coming your way
    header("Content-Type: image/png");
    
    // here it is
    readfile("/path/to/image.png");
    
    • http://php.net/manual/en/function.header.php
    • http://php.net/manual/en/function.readfile.php
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

May be it sound dumb but if I want some computed value from other
Semantically, I want an itemized list, but visually I just want some space. How
In my Rails application there are some metrics about the content of the database
I'm developing a new site that graphs some operational metrics. As such about a
I want to draw a metrics with some number of columns and rows over
I've had some interesting conversations recently about software development metrics, in particular how they
I want create some type of ASP.NET (C# 2.0) Metrics class to help monitor
If I want to add some instrumentation in my code for getting metrics like
So I have some lidar data that I want to calculate some metrics for
I want some examples of C preprocessor directives, such as: #define pi 3.14 #define

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.