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.