Capturing page content that is using cookies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Damiro

    #1

    Capturing page content that is using cookies

    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_conten ts currently. Is there another way to do this
    so that cookies work?

    --Dave

  • Rik

    #2
    Re: Capturing page content that is using cookies

    Damiro wrote:[color=blue]
    > 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_conten ts currently. Is there another way to do
    > this so that cookies work?[/color]

    Never used it, but CURL seems to be the answer.


    Grtz,
    --
    Rik Wasmus


    Comment

    • Alvaro G. Vicario

      #3
      Re: Capturing page content that is using cookies

      *** Damiro escribió/wrote (27 Jun 2006 08:38:08 -0700):[color=blue]
      > I'm using file_get_conten ts currently. Is there another way to do this
      > so that cookies work?[/color]

      If they're available in your system, curl functions do all the dirty work
      for you. Check specifically curl_setopt() with the CURLOPT_COOKIEJ AR
      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
      --

      Comment

      Working...