Jump to content

Sending info back to a server


graham23s

Recommended Posts

Hi Guys,

 

i'm curious as to how this process works, say for example you signup for quantcast or another company, they always give you code to insert into your pages so they can track hits and locations etc:

 

example:

 

<!-- Start Quantcast tag -->
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<script type="text/javascript">_qacct="p-80W_gNN6HDhNM";quantserve();</script>
<noscript>
<a href="http://www.quantcast.com/p-80W_gNN6HDhNM" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-80W_gNN6HDhNM.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
</noscript>
<!-- End Quantcast tag -->

 

what i'm wondering is how the information is sent back to quantcast? is it javascript or PHP for example? POST or GETS etc

 

thanks for any info guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/136980-sending-info-back-to-a-server/
Share on other sites

You are given a unique account id: p-80W_gNN6HDhNM

 

If javascript is enabled, it loads their tracker script from THEIR server:

<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>

Then it sets your account id and runs their function quantserver(); :[

<script type="text/javascript">_qacct="p-80W_gNN6HDhNM";quantserve();</script>

Which could do anything really.. such as postback via Ajax info about something.. I haven't looked at their code.

 

Otherwise, if javascript isn't enabled, it has the browser try to load an invisible picture, named after your account name:

<a href="http://www.quantcast.com/p-80W_gNN6HDhNM" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-80W_gNN6HDhNM.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>

This will track at the very least as a hit from the person viewing your website as a pagehit for your account..  It may be able to pull other info such as their User Agent, IP(of course),  etc etc.

 

I'm assuming this is a page stats tracking service?

 

Generally it's this little bit here:

<img src="http://pixel.quantserve.com/pixel/p-80W_gNN6HDhNM.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>

that accesses the quantcast site to retrieve an image file (likely to be a 1x1 pixel transparent gif that is hidden so its presence doesn't break the page)

 

Access to that image will appear in the quantcast site server logs, and the actual image filename (p-80W_gNN6HDhNM) will be a unique value that determines who/where the request has come from.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.