By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Capturing page content that is using cookies

P: n/a
In building an application, I am trying to capture the content of a
page to see if the user has permission to view it. If they have
permission, show the link.

The user logs into the system and it sets a cookie. I'm trying to look
for the cookie, but it doesn't show any. When I view the page
directly, I do see the cookie.

I'm using file_get_contents currently. Is there another way to do this
so that cookies work?

--Dave

Jun 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Rik
Damiro wrote:
In building an application, I am trying to capture the content of a
page to see if the user has permission to view it. If they have
permission, show the link.

The user logs into the system and it sets a cookie. I'm trying to
look for the cookie, but it doesn't show any. When I view the page
directly, I do see the cookie.

I'm using file_get_contents currently. Is there another way to do
this so that cookies work?


Never used it, but CURL seems to be the answer.
http://www.php.net/curl

Grtz,
--
Rik Wasmus
Jun 27 '06 #2

P: n/a
*** Damiro escribió/wrote (27 Jun 2006 08:38:08 -0700):
I'm using file_get_contents currently. Is there another way to do this
so that cookies work?


If they're available in your system, curl functions do all the dirty work
for you. Check specifically curl_setopt() with the CURLOPT_COOKIEJAR
option.

--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--
Jun 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.