php pixel for image tracking

Posted on 2009-02-16
Last Modified: 2012-05-06
I am looking for a way to do some basic tracking with php.

I need to do the basic 1x1 gif pixel, white... (i remember transparent being a bit more work last time...)

I have my htaccess file set up so I can process the file as a php file.

This is my htaccess file.

it's in the main folder that I am doing the testing in.


AddHandler x-httpd-php .php .html .gif


Open in new window

Question by:cntmedia1
    LVL 107

    Expert Comment

    by:Ray Paseur
    Why not just use Google Analytics?

    Accepted Solution


    function makeImage()
    header("Content-type: image/gif");

    $img = @imagecreate(300,100) or die('GD error');

    $background_color = imagecolorallocate($img,50,50,50);
    $text_color = imagecolorallocate($img,0,0,50);

    imagestring($img,1,1,1,"a", $text_color);

    $img2 = imagecreate(1000,2);

    $background_color = imagecolortransparent($img2,$background_color);





    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Android App Development

    This course will involve creating widgets, customize list view, grid view, spinners, etc. Creating applications using audio, video, and SQLite database. Ending with publication on Google Play.

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

    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