tags:

views:

318

answers:

2

Well, I encountered this new term in programming. What is it? How does it works and how to use it? Can somebody illustrate in php?

I have a website, full flash. That site is for signup, enter username and email. The button is in flash.

An user visit my site, www.domain.com/index.php?var=string

Can I use pixel tracking method to pass this URL variable($var) to another php page (email subscibe processing php page) together with username and email from Flash/AS3??

+2  A: 

The more common term is Web bug: an invisible (i.e. 1x1 transparent pixel) image embedded in a web page or email, with its URL containing parameter data. When the page/email is displayed, it will load the image, thereby causing a request containing the parameter data on the server, which can then do things with that data.

Edit: I don't think the technique would work for what you want to do, since it sounds like the username and email address are entered into the flash app only after the page is fully loaded and displayed, i.e. after the request generated by a hypothetical web bug has already been sent. Can't you make the request to your signup page from the Flash code? Then all you need to do is somehow pass the URL parameter to the Flash app. I think that should be possible.

Michael Borgwardt
so, can I use pixel tracking method to pass the URL variable($var) to another php page (email subscibe processing php page) together with username and email from Flash/AS3??
tuergeist
yeah, I have 2 ways to solve this. First, get the URL variable in Flash, and the second method is using session to store the variable, once the processing is done, i would destroy the session. Of course, the first method would be the best choice, isn't it? But I am kinda more familiar with php than flash (AS3)
A: 

Is there anything wrong with simply passing your information via querystring from your Flash application to the PHP script?

If its just username and email then I don't think you need to do anything more than that.
Is there a reason you want to use this pixel tracking other than to simply learn how to do it?

espais
Yeah, I do have other purposes. I am thinking of passing the URL variable using session, once the email subscribe processing is done, i will destroy the session. This is the only solution I have in my mind
I need to keep track the var=string (which is the referral).