| View previous topic :: View next topic |
| Author |
Message |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Tue Jul 26, 2005 5:25 am Post subject: Cookies and PGWARE's Internet Pack Extension |
|
|
I need to download from a website (HTTP) that requires the use of cookies. As far as I can tell VDSIPP does not support them as I keep getting a page back informing me that my browser doesn't use cookies.
Is this correct or can I enable them somehow?
Cheers.
PS. I realise support is no longer offered for VDSIPP, but I'm just hoping someone will know and prevent me from wasting a lot of time. Thanks. _________________ John Trappett |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Tue Jul 26, 2005 5:49 am Post subject: |
|
|
| The http portion of the extension does not support cookies. You would have to use the vdsbrowser extension in vds5 or something similar and execute the code; you can hide the browser so it's not visible to users as well. |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Tue Jul 26, 2005 6:12 am Post subject: |
|
|
That's a shame I was hoping to make use of the THREADS capability of VDSIPP as I had a lot of small pages to download.
Thanks for the quick reply though.
Cheers. _________________ John Trappett |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jul 26, 2005 7:38 am Post subject: |
|
|
Cookies are sent as headers to the server, so if you find a tool which can analyse HTTP calls, you should be able to copy the cookie-header and to use the "internet http,header" command to send the cookie to the server...
| vdsipp help file wrote: | INTERNET HTTP,HEADER,<http client>,<string>
This command allows you to add any additional headers into the header of the POST/GET request by specifying it as the <string> parameter. |
Normal internet cookies are send like this:
| Code: | | Set-Cookie: VISIT=1; path=/cgi-bin; expires=Tuesday, 31-Dec-2007 23:12:40 GMT |
This is a simple cookie which counts the number of visits you made. This is how you can use it with VDS and the VDSIPP dll:
| Code: | | internet http, header, 1, "Set-Cookie: VISIT=1; path=/cgi-bin; expires=Tuesday, 31-Dec-2007 23:12:40 GMT" |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Tue Jul 26, 2005 8:06 am Post subject: |
|
|
Using Wget with the --save-cookie and --load-cookie options I was able to download the required files. This is the cookie info saved by Wget:
| Code: | # HTTP cookie file.
# Generated by Wget on 2005-07-26 16:53:24.
# Edit at your own risk.
.www.yourtv.com.au:80 TRUE / FALSE 2068430380 TOKEN C9A8F801511969DB21F5BE6E8AB48B0F
.www.yourtv.com.au:80 TRUE / FALSE 2068430380 PERSON_ID 2622468
.www.yourtv.com.au:80 TRUE / FALSE 2068436360 CFID 3649592
.www.yourtv.com.au:80 TRUE / FALSE 2068436360 CFTOKEN 30960108 |
Is that of any help in knowing what to send as the header info in a "internet http,header" command?
Cheers. _________________ John Trappett |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jul 26, 2005 9:27 am Post subject: |
|
|
Try something like this
| Code: | | Set-Cookie: TOKEN=C9A8F801511969DB21F5BE6E8AB48B0F; PERSON_ID=2622468; CFID=3649592; CFTOKEN=30960108; path=/; expires=Tuesday, 31-Dec-2007 23:12:40 GMT |
Or this with VDS:
| Code: | | internet http, header, 1, "Set-Cookie: TOKEN=C9A8F801511969DB21F5BE6E8AB48B0F; PERSON_ID=2622468; CFID=3649592; CFTOKEN=30960108; path=/; expires=Tuesday, 31-Dec-2007 23:12:40 GMT" |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Tue Jul 26, 2005 2:37 pm Post subject: |
|
|
More than likely the site is also setting the cookie, you would have to read the headers to see the contents of the cookie. It may dynamically create a special session id for each user as well.
You could then send back the cookie when it requests one.
I've never tried it so I can't say for 100% certainty. |
|
| Back to top |
|
 |
|