PHP/GD2 Image tracking with additional value

Posted on 2007-07-24
Last Modified: 2010-05-18
How I can track unique emails I sent using PHP and GD ?

Basically I have function where I'm saving into DB stats (file - script.php) and the using GD2 imagecreate() imagepng() I'm creating image - data collection works fine, but making situation more complicated - I want to track some part of emails, so I want to put there some unique ID - and now the question :

I have following code - <img src="script.php" alt="" /> .... now I want to add something like: <img src="script.php?id=22" alt="" /> - and question is how to get ID - it's not a POST or GET - s what is it ?

Maybe there is no solution, and you have some other ideas/ways how I can do it ? Or maybe you have some simple JS solution ?
Question by:devpete
    LVL 9

    Accepted Solution


    <img src="script.php?id=22" alt="" />

    The id number will be in the $_GET array:


     $id = $_GET['id'];


    Perhaps your problem lies elsewhere in your code?

    Author Comment

    Of course you have right - I just mixed up my variable name and I couldn't read this value - so I thought it must be some different array... ehhh doesn't matter ;]

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now