CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    S W Florida
    Posts
    2

    Need help with REFERER: and cookie's......

    I'm trying to get to a page that I need a REFERER and a cookie to open. When I run the code below I get a --

    Run-Time error 35756: Unable to complete request

    I've got it where I can log in and go to some pages but can not get to any pages that need the cookie.
    I'm using a function to read the cookie and put into the variable "cookie"

    Could someone please give me any hints as to what I'm not doing right?

    ---------------------

    Inet2.Execute "http://s1.foo-bar.com/scripts/mysector.cgi?" & webid, "GET", "REFERER: http://s1.foo-bar.com/login.php", "Cookie: " & cookie

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332
    seems to me that you need to use a vbCrLf instead of a comma between the referer and cookie.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Sep 2003
    Location
    S W Florida
    Posts
    2
    Thanks, that seems to be part of the problem, it fixed the run time error. Now its redirecting me to the log-in page again...............

    Oh well, back to the drawing board.

  4. #4
    Join Date
    Dec 2001
    Posts
    6,332
    If you have a packet sniffer, you will be able to easily see the problem. That's how I've always done this. I just emulate the way a browser logs in and such, sending the same headers and so forth.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured