如何获得utma utmz和类似的cookie与php卷曲? [英] How to get utma utmz and similiar cookies with php curl?

查看:154
本文介绍了如何获得utma utmz和类似的cookie与php卷曲?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到我的浏览器保留的Cookie不同于我的curl Cookie档案:

I noticed that my browser keeps different cookies than my curl cookie files:

"__utma=256586655.848991821.1337158982.1337158982.1337179787.2; __utmz=256586655.1337179787.2.2.utmcsr=login.example.com|utmccn=(referral)|utmcmd=referral|utmcct=/company.php; __utmc=256586655; PHPSESSID=8sedo85uc5rfpnluh06bdb0mk4"

这是我基于curl的cookie.txt:

And this is my curl based cookie.txt:

# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

login.example.com   FALSE   /   FALSE   0   PHPSESSID   8peqektoc5j3570h08efa6o3n2

如何创建utma utmz值以及该值代表什么?

So, how to create utma utmz values and what is that values stand for ?

推荐答案

这些是Google Analytics(分析)Cookie。

Those are Google Analytics cookies. Possibly, you're not telling curl to download third-party scripts referenced by the page.

尝试使用 - page-requisites 尝试wget, code>和 - save-cookies - load-cookies 。它会下载页面使用的文件,例如脚本。

Try wget with --page-requisites and --save-cookies and --load-cookies. It will download files used by the page, such as scripts.

不幸的是,如果使用典型的脚本驱动异步加载器,仍然可能无法加载Google Analytics(分析)以实际执行该工作。

Unfortunately, it still might not load Analytics if it's using the typical script-driven async loader, since JavaScript has to actually execute for that to work.

这篇关于如何获得utma utmz和类似的cookie与php卷曲?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆