Pixel Tracking

Mar 9, 2007

I have a php website that tracks a users name and what link they click and I record this into a mysql database.  I've recently setup with an affiliate program that allows pixel tracking and I wanted to record signups from that into my sql also.

I know I can use a simple php script to do this, but how can I get it to also pass the users name? I don't think I'm explaining this right.

Once a user clicks a link on my page it records that click under that persons username into my sql database.  Then it brings up the affiliate page.

Once someone fills out the form and clicks submit I can have a pixel tracking code in there to record but since I'm on another page it never passed the username so how do I record it into the right spot?  Maybe using frames?

ADVERTISEMENT

How To Use Pixel Tracking Across Domains

Jul 23, 2009

I understand the basics of pixel tracking, I'm able to insert a pixel that references an image on my tracking domain to other websites.

However, how do I increment that actual pixel count on my tracking domain? Is there some kind of log that tells me every time that pixel image was served up? Am i able to do something like:

<img src="http://www.foo.com/serveImage/getImage.php?id=5123" />

then have the getImage page, serve up the image, and increment based on the id that was passed in? or is there a better way to achieve this?

View 4 Replies View Related

Tracking Pixel In A Processing Script, Instead Of HTML Page

Jul 17, 2005

I have a Web form that is filled out on my company's web site. When
the submit button is pressed, the form data is posted to a PHP page
that (in the background) inserts their information into a database,
sends them a confirmation e-mail, etc.

Once the form processing is done, the user is redirected to a Thank
You Page. The thank you page has the following code in it:

[code].....

This code adds the user to an opt-in list so that we can send them
other products and services.

THE PROBLEM: Some of our affiliates collect our user's form data on
their Web site via a co-reg page, when this happens, they are posting
the form contents to the form processing page on my server, but the
user never sees the thank you page, so the IMG SRC code above is never
displayed, and they are never added to our opt-in list.

QUESTION: How would I insert the same code above in my form processing
page (that processes in the background) so that the opt-in occurs on
the form processing page, and NOT the thank you page?

View 1 Replies View Related

String Of Text (Number Of Pixels / Pixel Size / Pixel Length)

Mar 11, 2006

If I'm putting together a list of links and I want to get add each
item one at a time inside a foreach($aNames as $sName) loop,
is there an easy way to get the number of pixels that the $aName
takes up?

For instance, in creating a set of links...

foreach($aLinks as $sLink) {
if ((pixelsize($sLink, $sFont, $iFontSize) . pixelsize($sHTML . " ", $sFont, $iFontSize)) < 400) {
$sHTML .= " " . $sLink;
} else {
$sHTML .= "<br />
" . $sLink;
}
}

The goal is to keep the whole link on one and only one line letting
the browser automatically break up any given link..

View 1 Replies View Related

Read Images Pixel By Pixel Return The Hex Value Of It?

Jul 21, 2011

I am very unfamiliar with working with php and images. Can php parse through an image pixel by pixel and return the hex value of it?

View 1 Replies View Related

1 Pixel Web Bug

Sep 28, 2006

Im trying to read a cookie set by another domain from a site's thank you page, however i have found that i cannot read a cookie set by another domain. for example. user visits site A (cookie set) user is directed to site B user ends up at a certian page on site B (cookie A read and value passed back to site A) site A updates database I have seen some sites loading a 1 pixel image (google seem to do this with their conversion tracker) but when i try to do something like:

<img height="1" Width="1" src="http://www.mydomain.com/tracker.php">

and my tracker.php script tries to read a cookie that was set on mydomain.com, it can't.

<iframe src="http://www.mydomain.com/tracker.php">

View 1 Replies View Related

Pixel Color

Jul 17, 2005

I'm using PHP4.2.2 with gd on a Linux platform and am having difficulty
in solving a little problem despite going through the definitions of the
various image functions.

If you load a true-colour image from a file using...

$image=imagecreatefrompng("file.png");

....how do you then get the red, green and blue values of a pixel at $x,
$y within that image? I'm sure it's fairly simple but I can't find this
from what I've read so far.

View 2 Replies View Related

Image Pixel Border

Jan 7, 2007

I have a page that allows the user to specify a font, text, and size. Then the page displays it in a .png image for the font,text,and size they wanted. The image is transparent except for the text which is black. I want to be able to specify a border around the text. Is there a way to tell PHP to look for transparent pixels and colored (black) pixels and create 2 border pixels (red for instance) on the transparent side? All that I am using is: ImageColorTransparent($image,$background_color); with the background_color being white.

View 7 Replies View Related

Pixel Width Of String

Nov 10, 2006

How do I get the pixel width of a string? Is it possible? With PHP or any other language?

View 8 Replies View Related

Get The Transparency Value Of A Pixel On An Image?

Apr 18, 2011

How it's possible to get the transparency value of a pixel on an image? 'imagecolorat' picks only the index of the color of the pixel at the specified location in the image. With that index I can get the RGB values but not the transparent one.

View 3 Replies View Related

Convert PNG 24 With Per Pixel Transparency To PNG 8

Jan 5, 2011

Is it possible to take a 24 bit PNG with per-pixel alpha values and convert this into a 8 bit PNG while maintaining the transparency? The original image only contains a max of 256 colour so this should be possible, right? The rationale: I'm working on an image cropper in Actionscript which posts encoded bytearrays to PHP to be created as files on the file system. Unfortuantely ActionScript doesn't support GIF Encoding so when dealing with a gif with transparency we have to PNG encode it in Actionscript before posting it to PHP. We can then save it as a PNG and maintain the transparency by using the imagealphablending and imagesavealpha functions. The issue with this is the filesize is a lot bigger than the original gif. This is presumably because the colourspace is now true colour rather than the GIF indexed pallete.

View 1 Replies View Related

Simple Variable And Pixel At The E Nd?

Jul 5, 2010

I imagine this will be easy.

<div class="vote_pct" style="width: $widthpx;">

I want the variable to be $width and for it to have px on the end.If i put a space, it doesnt work.If i put them together, it treats it as one big variable name.Could I ask someone the correct snytax to achieve this?

View 4 Replies View Related

Piechart - What's The Mdidle Pixel Of An Arc?

Jul 6, 2009

I've built a pie chart script in GD. It works fine, but now I want to put labels in the pieces of pie.The circle diameter is equal to the width of the image, i.e. the circle fills the canvass.

Known information:
radius
pie piece start angle
pie piece end angle

Someone posted a comment under imagefilledarc() in the php manual for doing this but it doesn't work for me - all my labels just end up in the same place.I assume this is possible, but if not could we find the coord of the start and end angles of the pie piece?

View 2 Replies View Related

Random Pixel Generator

Apr 4, 2007

Im trying to create a program that generates random pixels from a set picture.. i know how to write a random number generator its just figuring out how to take that one step further and getting it to grab pixels from a picture and show them one by one when somebody clicks generate button. there needs to be 1,000,000 pixels in total. Raar my head hurts trying to think of a way to do it!

View 5 Replies View Related

Pixel Color Detection Possibilites...

Jun 20, 2005

However, i've also heard that you can use PHP to determine the color of specific pixels - is this true? I'd be very interested in writing a script that takes a small image, say 100x100 and maps the color of each pixel to an array. Any thoughts?

To be honest i'm really just looking to see if a pixel registers black or white. I can prepare the image to make sure it's either 100% black or white... where do I start? I'm eventually going to take this info and send it into flash and play from there....

anyone know how to do this? is it even possible? where do I start?

View 4 Replies View Related

Setting The Grayscale Value Of A Pixel In Script?

Jun 24, 2011

I have a jpeg image resource loaded into a variable in php. Given a grayscale value, like 6, how can I set a single, particular pixel to that grayscale value? My client has made it exceedingly clear that there is a big difference between grayscale and rgb. Is this even doable in php with the GD library? If so, how?

Note: The script does indeed grayscale the entire image, but using an obscure algorithm. My script obtains the RGB for each pixel, and obtains the grayscale value corresponding to the algorithm. It just needs to now transform that pixel to that particular grayscale value.

View 2 Replies View Related

Html - Color Image By Pixel?

Aug 20, 2010

I have 2 vector . The first vector save the gradiend of 1 color . For example: from green to white. I want to color an image via pixel . for example we give the cordinate of an pixel (X ,Y) and dhe color RGB 40 , 60 , 120 and to color this pixel ect.. Is any function in php that can do this ??

View 1 Replies View Related

Pixel Calculations In Bitmap File

Oct 5, 2010

How to open and read bitmap file without using image library like gd. I need to perform certain calculations on pixel so need to seperate the header from the image

View 1 Replies View Related

Get Uploaded Image Pixel Size?

Aug 16, 2009

i am trying to get the pixel size from my images

as soon as i upload them i would like to store that pixel size into my database to display it later on screen.

all my images are different sizes for example 1200 x 800, 200 x 200, 4095x4095 etc.

i was thinking it could be done by grabbing the information out of the image properties somehow on upload,

View 3 Replies View Related

Get The ACTUAL Pixel Width Of A Font?

Jan 15, 2010

see this link: [URL] see the long file names (iStock_000...). what I want to do is create a PHP function to which I pass the font and font-size, a string (the long file name in this case), and a desired max length. The php function would then start munching characters from the middle and insert an ellipsis, like this:

Code:
iStock_0..mall.jpg

so that the resulting string is just under the max length. obviously I need to know each ascii character's absolute pixel width at that font and font-size. I know this can be done with gd library, is there any other way to do it? even if I had reference to a chart of widths, that would be great - I only need this for arial, georgia and times new roman, and from 10-14px font.

View 3 Replies View Related

Image Resizing And Max Pixel Resolution

Sep 5, 2007

I have image resizing code that is resizing most of the time, apart from when then images are of a large pixel dimension i.e. width of over 2000 pixels even though image is just over 400KB so this wuld rule out the fact that the host provider has increased the max file size.  The original image uploaded remains the original size - no resing occured. I need the image resize to work all of the time.

View 1 Replies View Related

Capturing Pixel From Image Whenever We Click On Images

Sep 8, 2006

i want a php code for capturing pixel from image whenever we click on images (then the pixel of that click portin should be stored in a variable), do u have any idea how to do that.

View 1 Replies View Related

How Do I Echo A Binary Array (transparent Pixel)

Jul 17, 2005

What am I doing wrong here? I want to display a transparent pixel...

<?
$transparent1x1 = array (71, 73, 70, 56, 57, 97, 1, 0, 1, 0, -128, 0,
0, 0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0,
1, 0, 0, 2, 2, 68, 1, 0, 59);
header("Content-type: " . image_type_to_mime_type (IMAGETYPE_GIF));
echo $transparent1x1;
?>

View 2 Replies View Related

Convert Pixel Into Point Size In Html?

Jan 24, 2011

i want to convert my pixel into to the point size, in my project when user resize the text image, then it should be re size according to width using point size??

View 1 Replies View Related

Determing Pixel Length Of String Server Side

Sep 29, 2001

I am trying to determine the width of a string in pixels on the server as it will be when the corresponding css has been applied on the client. The reason i need to do this is that I use fancy bevelled edge table and need to work out the string length in pixels to enable me to src the correct image. Using string length does not work because the database could contain the following.

I AM A STRING
i am a string

As you can see the two strings when loaded on the client are different widths. There is no option to turn off case.

View 2 Replies View Related

Save Pixel Position On Dynamically Resized Image?

Apr 6, 2011

So here is the goal of my application: Using a webcam, the user will position to points on the video of themselves. Once positioned correctly that video will save out a jpg and the coordinated of those two points will be saved relative to the size of the image. So this image and the image data associated with it will be used in multiple situations and also in different sizes. So my question is: what would be the best method to resize these images but also keep the points coordinates relevant and accurate?

View 1 Replies View Related

Attempt To Optimize A Pixel Reading And Outputing Function?

Sep 20, 2010

$img = imagecreatefrompng("img/".$image);
$w = imagesx($img);
$h = imagesy($img);
[code]....

Width isn't getting multiplied by 'factor' for some reason. I'm trying to do it in such a way that jQuery does it to each and every child div, basing the new width off the old, without having to do a huge for loop or anything, but nothing I'm coming up with is working.Edit3 - Finally got it working! I just stored the original lengths of each div as the 'id' attribute in each and then access that when it comes time to resize everything.

View 2 Replies View Related

Make A Greyscale Image Out Of Array, Scaled To The Maximum Pixel?

Jul 17, 2005

Can the GD library do this? I have an array of numbers (which I shall be manipulating
server-side), which I wish to convert into an image. The elements of the array are essentially the 1D subscripts of a 256*256 image. I've been looking at the GD library functions all day, but I can't seem to translate the array to a jpeg or png or whatever. (The GD library functions are working though.) It seems that creating an image from another image is easy, but not from the raw data. How can I make a greyscale image out of this array, scaled to the maximum pixel?

View 1 Replies View Related

Image Processing - Script To Render A Single Transparent Pixel (PNG Or GIF)?

Jul 8, 2010

I have to create a PHP that will return an image stream of one transparent dot (PNG or GIF)

View 1 Replies View Related

CodeIgniter Creating Thumbnails With One Black Pixel In Top Left Corner

Jul 11, 2010

Warning: I don't have much experience with CodeIgniter and I am updating a site originally create by another developer. For some reason the CodeIgniter image class is creating thumbnails with a black pixel in the top left corner. Here is an example: This only seems to happen in production (this site is being hosted on a super lame shared host). Thumbnails are created just fine on my OS X dev machine and my Ubuntu machine on Slicehost. The code is pretty boilerplate, and from what I can tell the image library doesn't have a whole lot of options to screw up. The options look like this:

[code]...

Has anyone run into this issue before? Google & SO searches aren't getting me anywhere. These pixels are driving me nuts. As I was afraid, this didn't have anything to do with CodeIgniter. Something is screwy with the host's GD library and they don't support anything else.

View 4 Replies View Related

IE-text Input Fields "clickable" Region Is Only 1 Pixel Wide?

Mar 20, 2011

I have a simple input form with input fields that are 3 characters wide. To gain focus to these fields however, I must click the very, very LEFT of the field, about 1 pixel or cursor width wide. The form works fine in Firefox and Safari, where you can click anywhere in the text input field to gain focus.

The form:

<form name=game_edit method=post action="?includepage=game_results.php&gameID=<?=$gameID?>" onsubmit="return validate_form();">
<table border="0" id=gameResults>
<tr><th colspan="4">RESULTS FOR: <?=$gamedate?> HOSTED BY <?=$hostName?></th></tr>
<tr>

[Code]...

The offending form field is the "place" field...it is clickable only on the very left of the form field instead of the entire form field, in IE only. (IE 7, that I know of).

View 2 Replies View Related

Tracking

Nov 26, 2007

i have made a email newsletter sign up page and there is a php file that processes the information and inserts the information the user has entered in the form into a table.

the php file is in linux server and the webpage is an asp page hosted on a cms system using microsoft

using the php file that is in linux is it possible to track which page the user had clicked on the website before filling out the newsletter information as there are links in more than 1 page on the website from where the user can click and fill out the form.

View 2 Replies View Related

DHL Tracking

Sep 17, 2007

Has anyone had success performing simple DHL tracking using PHP & XML? (not by tracking URL)

I signed up, and was sent their information, but can't get it to work. They want to receive XML data over POST, and they will send an XML response. Their documentation pores over each XML element (they're focusing on creating/modifying shipment), but does not give a single practical code example for any language.

View 7 Replies View Related

Tracking Down A BUG Only In IE?

May 26, 2011

I've been scratching my head for a few days over this one and I just can't track down the bug which stops my web page working in IE Web page is here..[URL]..Everything works fine in FF & Chrome, but when in IE it fails to load.

View 8 Replies View Related

IP Tracking

Apr 10, 2007

i was wondering if it was possible to find someone's IP address then save it to a file like a cookie i suppose but on the server machine instead, where as a cookie is saved to the user's machine, it just really so i can check which IP addresses are viewing the web site and to try block any that shouldn't be there, i was also wondering if it is possible to save a session variable to a file, because when customers login they are assign a session id variable, so that it takes that id searchs the database for their details and shows only their info ??

View 2 Replies View Related

Determine Difference In Color Between AA Pixel And Foreground Color - Apply To New Color?

Apr 20, 2011

The Image has a background of solid red, a foreground of solid grey. On the edges of the foreground there is some anti-aliasing from grey to white. What I need to do is change the foreground color to a user specified color and the red to transparent. This is easy enough using imagecolorcloset + imagecolorset/imagecolortransparent. The problem is the antialasing part. I believe I need to loop through the pixels in the image. This would appear to work: [URL].... I believe that I now need to determine the color difference between the foreground color and the anti aliased color. So

Foreground Color = rgb (153, 153, 153)
Anti-Alias Pixel = rgb (173, 173, 173)
New Color = rgb (0, 0, 255)

How do I determine the difference in color between the AA Pixel and the Foreground Color then apply it to the new color?

View 1 Replies View Related

Session Tracking

Sep 25, 2000

How to do session tracking in P.H.P.?

View 1 Replies View Related

Referrer Tracking

Jul 17, 2005

I've just written a VERY simple shopping cart system for my own joy and
edification as much as anything else. Mostly it was an exercise in learning
about sessions but I want to keep adding to it.

What happens at the moment is that it starts a session when the visitor
enters the site. As soon as the visitor adds something to their cart it
adds a row into a table where the session id is used as the unique
identifier in the table. The table also has columns for the product id and
price (joining tables will be my next learning curve)

One of the things I want to be able to do is affiliate tracking. The way I
have it in my head is that there will be an extra column for refid (or
something) so that:

www.whatever.com?refid=1234

will be used. 1234 will then get written to the table when the visitor
starts to add stuff to there cart.

What I need to know is

1. Is this reinventing the wheel? Is there a better way already
2. If the user hits the site and just looks around for a while, how do I
make sure that the refid variable is maintained until they add something to
their cart?

View 1 Replies View Related

Cookies And Tracking

Aug 19, 2001

I am not sure what the protocal is in posting code so I do aplogize if this is done in error.

<?php
// set cookie if not already set

if (!isset($id)) {
srand((double)microtime()*1000000);
$randval = rand();
setcookie("id",$randval,time()+14400,"/",".contesthound.com",0);}?>
Code:

View 3 Replies View Related

Visitor's Tracking

Jan 20, 2005

I am currently trying to develop a small php-written application which allow me to track every single visitor coming to my website.

I would like to track each visitor by IP address, Port number, Session, the pages they visit, and want to identify which visitor is the returned one.

I do need some help from all of you. Can anyone give an idea of how to do that, or give me links to webpages where I can retrieve info about that.

View 1 Replies View Related

Tracking Bandwidth

Sep 16, 2005

I have a chat script which I added very basic bandwidth tracking to as follows:

ob_start();
print "this is some output!";
print "this is more output!";
$bytes = ob_get_length(); // Amount of bandwidth used
ob_end_flush();

The problem is that this merely gives me how many bytes of text were printed...
The script uses JS functions in external files to generate everything for the
page, which means the .js files are cached after the first time and only a
<script> tag and a list of function calls are sent per refresh.

I would like a way to know if the client has cached these scripts, or if they
are being sent for the first time, etc, so I can add the file size of the .js
files to the bandwidth total..

e.g. if ($client_has_not_cached_js_files){ $bandwidth += $size_of_js_file; }

The chat script also allows for user icons, so again I would like to be able to
tell if each image was cached or whether a new copy of the image was sent to the
client.

Is there any way I can get this info with Javascript and then use AJAX to post
it back to the server ?

View 1 Replies View Related

Tracking Http_post_vars

Jun 30, 2000

I found out I do have track_vars on but it doesn't do what i was hoping it would do.

"If PHP's track_vars feature is turned on, either by the track_vars configuration setting or the <b><?php_track_vars?></b> directive, then variables submitted via the POST or GET methods will also be found in the global associative arrays $HTTP_POST_VARS and $HTTP_GET_VARS as appropriate."

As it currently goes, I am looking to modify phpMyAdmin. It starts with: lib.inc.php3 which includes config.php3. Then index.php3 includes left.php3 and main.php3. If I set user variables in config.php3 to read the $HTTP_POST_VARS[username] for example it lets me log in with username password from a form that calls index.php. Otherwise I could manually set the username and password in config.php3 and call index.php3 but this would negate the form based login.

While this works ok. I would later want to call the $HTTP_POST_VARS[username] variable from another page, such as main.php3 which is an include on index.php3. But, for some reason it doesn't track the variable past the page that gets called from the form where action=index.php3. Is this normal and expected behavior or should the HTTP_POST_VARS array automatically be global? Or Do I have to declare it global such as if it were to be called from a function?

View 3 Replies View Related

User Tracking

Jun 9, 2003

Does anyone know how to track user between pages? I've been using session, but it still stay as a user if I click on "back" button. Is there any way to automatically logout the user if the 'back' button clicked or the page freeze for amount of time?

View 1 Replies View Related

Click Tracking

Nov 7, 2005

I have a portal where people advertise and on they are allowed to display their website addresses so that people that visit the site can go directly from their site from my site.

Do you know of a class or script that would be able to monitor when someone visits an advertisers site i.e. records the click as they go across to the advertisers website.

I could build this myself, but thought that there may be a class or script that would do this already. (Would like this to be stored on a MySQL database opposed to a text fil.

View 2 Replies View Related

WAP Session Tracking

Nov 23, 2005

I'm trying to use PHP to track user sessions on a WAP page. Since cookie handling is spotty at best on mobile devices, I'm using the session id in the query string to track the user. I've set my php.ini to not use cookies in session handling, but PHP is still not inserting the session query string into the links on the pages. Could it be because PHP doesn't recognize WML and doesn't know where to put the session id?

View 1 Replies View Related

ADVERTISEMENT