Cloudfront - create user session cookie

时间:2019-04-16 22:43:46

标签: javascript cookies amazon-cloudfront

I try to make a robot which will be adding new ads on a certain website, but I have a problem, because this website is secured by cloudfront.net. This site make special cookies (using javascript) and then this cookies are sending with gif pixel. Now, when I try add advert without sending this gif pixel with correct cookies - my advert is deleted.

Here is javascript code: https://d31qbv1cthcecs.cloudfront.net/atrk.js

As you can see, in this code is something like that:

sess_cookie:function(){return t.gc("__asc",t.user_cookie_v,"sess_cookie",1800)}

finally, the cookie has name: "__asc" and value is (for example): "3aa837b116a283bf71997965f38".

The final pixel gif looks like that: https://certify.alexametrics.com/atrk.gif?frame_height=258&frame_width=1536&iframe=0&title=PAGE_TITLE&time=1555453336200&time_zone_offset=-120&screen_params=1536x864x24&java_enabled=0&cookie_enabled=1&ref_url=https://www.url_of_website.com/post.html&host_url=https://www.url_of_website.com/&random_number=4623988506&sess_cookie=3aa837b116a283bf71997965f38&sess_cookie_flag=0&user_cookie=3aa837b116a283bf71997965f38&user_cookie_flag=0&dynamic=true&domain=url_of_website.com&account=wS4fj1a4ZP00g+&jsv=20130128&user_lang=pl

Many of these params is in these javascript codes: https://d31qbv1cthcecs.cloudfront.net/atrk.js and: https://www.googletagmanager.com/gtm.js?id=GTM-KSFR4N

For example, in these JS codes I found params: jsv: 20130128, account: wS4fj1a4ZP00g+,

But how I can calculate/create this cookie: sess_cookie=3aa837b116a283bf71997965f38 using PHP? I need to create this cookie, because I need to send this cookie using CURL_POST.

Thanks.

0 个答案:

没有答案