gpt4 book ai didi

php - CURL解析PHP

转载 作者:行者123 更新时间:2023-12-03 17:20:16 26 4
gpt4 key购买 nike

在我的网站上,我有一个Google Analytics(分析)通用跟踪代码,该代码会使用以下参数生成一些请求go google .gif文件:



如何解析查询字符串参数中的所有参数,或者仅解析.gif文件cUrl中请求的所有参数?

网址示例:

curl 'http://www.google-analytics.com/collect?v=1&_v=j16&a=589794211&t=pageview&_s=1&dl=http%3A%2F%2Fmellowkids.ru%2Fserv-ga%2Ftest.php%3Futm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term%3Dkeyword%26utm_content%3Dadstext%26utm_campaign%3Dcampaignname&ul=ru&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1563x436&je=1&fl=12.0%20r0&_u=MAC~&cid=1374804136.1392407945&tid=UA-44059933-1&z=743339889' -H 'Accept: image/webp,*/*;q=0.8' -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Referer: http://mellowkids.ru/serv-ga/test.php?utm_source=google&utm_medium=cpc&utm_term=keyword&utm_content=adstext&utm_campaign=campaignname' -H 'Accept-Language: en-US,en;q=0.8,ru;q=0.6' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36' --compressed

最佳答案

您可以使用parse_str功能。

关于php - CURL解析PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21790048/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com