Jump to content

[SOLVED] javascript tracker not noticing curl visit


teamplaylotto

Recommended Posts

Hi,

I've searched and searched but I can't find a way around this..

 

I've written a script that logs in to my site with my details and stores the cookie, that works no problem, I can visit another page on my site with the cookie and parse the page that is given, the result I get tells me that curl saw a page that is only shown to a logged in user.

 

once I do that, I want to visit a url that I parsed from the page using the same cookie but the url I visit has a javascript tracker on it, I want the tracker to 'know' I've been there but since curl doesn't execute javascript, the tracker doesn't get called by the javascript in the html that I parse.

 

I have live http headers plugin and can see what url's the javascript makes a call to so I tried setting the url to that and passing the cookie data but the tracker doesn't show the visit made by the script posing as me.

 

am I missing something obvious?

 

I'm pretty sure the javascript call for the tracker tries to see if a cookie is held by the surfer, if it is, it logs the visit.

 

anyone have any experience with this?

 

regards

 

Andy

Link to comment
Share on other sites

javascript works in a browser curl requests are sent between firefox and they are 'direct' connections between the servers the servers don't execute any javascript because javascript is designed to control userinteraction on a web page - as there is no need for any of that it doesn't get executed.

Link to comment
Share on other sites

thanks for your response btherl,

I am setting the user agent to to the same as if I was browsing myself, maybe I need to play with it a bit more.

 

the tracking script is similar to google analytics but it only regisiters a hit if the person visiting has a cookie from the members site. I'll see what I can do with some more searching!

 

Andy

Link to comment
Share on other sites

Christ my post was awful!!!!

 

terrible english (I was tired).

 

try again - basically a curl request happens between the 2 servers - no matter what client you are using it is the 2 servers performig this transaction NOT the client. Ergo the javascript you are using as a tracker will NOT get executed - you will have to pass ALL teh infomation you want processed (like your id etc.) in the curl headers so that the processing script has all the data it needs to do checks calcs etc...

Link to comment
Share on other sites

hehe toonmariner,

your reply was the first thing I read when I got up this morning and my first thought was WTF? lol

thanks for making it clear(er)

 

problem solved!

 

I had much reading of curly things today and after muchos experimenting and viewing of live http headers and comparing that to other headers sent by using different accounts, I have managed to find the url the javascript calls to log the tracking. It was then a simple matter to set cookie, referrer and adding a timestamp before doing a curl_exec to the tracking url.

 

thanks for your help!

 

Andy

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.