1

I'm trying to log into a website via php/curl that uses an X-CSRF token for authentication. Looking at the headers in Firefox with LiveHttpHeaders I can't see the token being passed via cookie in any GET requests... it seemingly just appears in the header of the POST login request as well as the POST login fields. Any ideas as to how to login into a site via php/curl that uses these tokens? How do I go about grabbing the token and including it along with my username and password in the post_fields curl_setopt?

4

1 に答える 1

1

私はここで私の問題を理解しました...トークンは、ヘッダーやCookieではなく、htmlメタタグで渡されます。トークンの preg_replace を介して html を解析するとうまくいきました。

于 2013-03-06T18:23:32.443 に答える