简体   繁体   English

如何仅使用php解析注册用户的网站部分信息

[英]How to parse information on website section for registered users only using php

I'v tried to change my headers using header() function both like curl_setopt() but my headers did not change. 我试图使用header()函数来更改我的标头,就像curl_setopt()一样,但是我的标头没有变化。 Is there any addition actions need to change my headers? 是否需要任何其他操作来更改我的标题? If the section of website which I want to parse is only for registered users, they can keep cookies with auth-data. 如果我要解析的网站部分仅适用于注册用户,则他们可以保留带有身份验证数据的cookie。 Do I need additional header information got from auth-cookie? 我是否需要从auth-cookie获得的其他标头信息?

You have to send the cookie-information with each request. 您必须随每个请求一起发送cookie信息。 This could be done easly with curl. 卷曲可以轻松完成。

http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/ http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM