Solved

USING COOKIES FROM A DELPHI APPLICATION combined with ASP

Posted on 2004-08-30
2
225 Views
Last Modified: 2010-04-05
Hi there,

we have an internet site running on Win 2K written in ASP. It is a statistics page where users have to enter their username and password for retrieving their specific data. On that page, there is an option to login automatically. The site writes a cookie in this case to the local PC and next time the site detects this cookie and logs is automatically. Now we have written a DEPLI app that automatically goes to that site. This application should login automatically. So we have to put the cookie on the local PC so that the site detects it. How can we put the cookie on the local machine from out Delphi?
Or is this just not possible??

0
Comment
Question by:TDDatATS
2 Comments
 
LVL 13

Expert Comment

by:BlackTigerX
Comment Utility
are you using a TWebBrowser component to go to that site from Delphi?
if you are, you already have the cookie, the only "problem" now is to see how they implemented the "automatic" login, some pages provide a button like "login as whatever" or "enter a new user name", in which case all you need to do is push that button and you'll be redirected...

so,
- what are you using (from Delphi) to access the site and
- how is the "automatic" login implemented?
0
 
LVL 2

Accepted Solution

by:
DarkCore_ earned 125 total points
Comment Utility
Better to try to fight with internet explorer to set a cookie, is let internet explorer set it.

 For example, you can use a "encryption" algoritm to set the user-name + password and an aleatory "hash" and the localtime, launch the explorer and pass it to a webpage ( http://myserver/autologin.cgi?param=xxxxxxxxxxx&hash=yyyyyyy&localtime=zzzzzz ) and let the webpage confirm this convination is correct and set the cookie and autologin.

Why this? surely you log-in using session variables, and session must be started at server. If you set a cookie with a session not created from server, it will be invalid.

Edu
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now