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?
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:
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?
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?
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:
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.
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.
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.
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?
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?
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!
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?
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.
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 ??
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:
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.
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.
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.
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?
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.
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?
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:
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.
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.
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.
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.
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.
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 ??
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?
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:
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?