getURL and cookies

For some time, my PB10 app has happily been using a getURL call to retrieve HTML from a site.  Recently, a cookie is now required to access the same URL.  After permitting the cookie to be set, I can access the page in a browser, but how to provide the cookie info when accessing from PB?

Here is an example:

ls_URL = "http://www.tsnhorse.com/cgi-bin/instant.cgi?type=inc&country=USA&track=SA&date=2006-03-26"
getURL (ls_URL, this)

This used to work fine and return valid HTML to the data blob (i.e. as viewed in a browser), but now rather returns a page informing the necessity of registration, which simply places a cookie on the user computer.  After the cookie is placed, browsers work fine, but not the PB  app because, I presume, the cookie info needs to be passed.  How do I append the Cookie header item to the ls_URL value, so that it is treated during the HTTP GET as a separate Request Header item, and not part of the  main Request-line?

Example cookie info is: Cookie: EMREG=myname@mydomain.com; REGISTERED=TSN_INSTANT_CHARTS

Or, is there an alternate to PB 'getURL' for such detailed processing,  perhaps by a PBNI, or external ActiveX?

Thanks,

Ted
musefulAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

buasuwanCommented:
Hi Ted,

    Have you try Microsoft WebBrowser Control?  It works better than getURL() and PostURL().  Please download my sample code from link below.  I think this will solve your problem.

http://www.mycgiserver.com/~unoksoftgroup/powerbuilder_win32api/powerbuilder_win32api.html#5


Regards,
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
musefulAuthor Commented:
Hello,

Your suggestion lead to some testing, which finally solved my problem.  PowerBuilder's getURL method worked fine in the end - I was just storing the cookies in the wrong browser cookie area.  Normally I use Firefox, but PowerBuilder references cookies stored in \Documents and Settings\[User]\Cookies (i.e. where MS Internet Explorer places them).  When I created the required cookie in that Cookie folder, PB getURL found them and used them with no further programming.

However, MS Webbrowser control will be otherwise valuable.

Thanks for the ideas!

Ted Craven
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.