Solved

Post Data problem - ciuly if u can help me with this cuz u have helped me once on this prob.

Posted on 2006-06-12
11
338 Views
Last Modified: 2010-04-05
Hi,

I want to get the results from http://www.abebooks.com/servlet/SearchEntry. Well it was working by 2 days ago and suddently I`m not sure what happened, maybe they added cookies to the page ?
I need a procedure just to get the results, I`ll change the params later.

Thanks
0
Comment
Question by:crystyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 28

Expert Comment

by:2266180
ID: 16886493
I don't remeber this page. sorry. can you post your code? I'd hate to spend 30 min doing a test app :)

what I want to emphasis:
- you have a few hidden inputs: you must send them as well (in case you didn't)
- you also have some fields that MUST be sent (see the * in the page)
- make sure that the "cty" select has correct value (from that list)

also, would have been helpfull to send the error message that you get ;)
0
 

Author Comment

by:crystyan
ID: 16886524
 params := 'sts=t&an=&pn=&tn=&yrl=&yrh=1962&isbn=&prl=&prh=&kn=' +
    keyword + '&cty=200000237&bx=off&bi=0&sortby=' + Op.Sort +
    '&fe=off&sgnd=off&dj=off&ds=50';

  PostData('http://dogbert.abebooks.com/servlet/SearchResults', params, true);
0
 
LVL 28

Expert Comment

by:2266180
ID: 16886587
could you post the code for PostData procedure?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:crystyan
ID: 16886618
www.cristianignat.com/diverse/TIE_http_https_build_046.zip - this is the componenet.

the procedure:
  IEHTTP1.URL := url + '?' + params;

  IEHTTP1.RequestMethod := 'POST';

  try
    IEHTTP1.Execute;

    HTML := IEHTTP1.sl.Text;
  except
    on E:Exception do
    begin
      HTML := '<<ERROR>>';
      MessageDlg(#13 + 'Connection error. Either one of the used server is down, either your internet connection is down.', mtWarning, [mbOk], 0);
    end;
  end;
0
 
LVL 28

Accepted Solution

by:
2266180 earned 500 total points
ID: 16886876
well .. I didn't get those sources :D I preferred to work with indy. so after I failed to get the data using normal operations, I started to debug the process and noticed that there was as redirect ot an url that contained the same domain/paath but the params were added. probably some ugly hack on their site, because then I made a get on that url directly and it worked just fine :)

here is the code:
var params:string;
begin
  idhttp1.HandleRedirects:=true;
  params := 'sts=t&an=&pn=&tn=&yrl=&yrh=1962&isbn=&prl=&prh=&kn=' +
    'test' + '&cty=200000237&bx=off&bi=0&sortby=' + '0' +
    '&fe=off&sgnd=off&dj=off&ds=50';
  memo1.lines.text:=idhttp1.get('http://www.abebooks.com/servlet/SearchResults?'+params);
end;
 
I used "test" keyword and sort of "0"
0
 
LVL 28

Expert Comment

by:2266180
ID: 16886884
oh, and btw, you got the post url wrong :)
0
 

Author Comment

by:crystyan
ID: 16886988
THANKS !
me being soooo dumb!
0
 
LVL 28

Expert Comment

by:2266180
ID: 16887331
I have to disagree with that. I am doing such mistakes pretty often (considering that I usually work on projects even after 2 am). I like to believe that I am not paying enough attention or I am distracted :D (which is true)

peace
0
 

Author Comment

by:crystyan
ID: 16944195
sorry I forgot to accept ur answer lol.

I just wanted to post a new question for u. and saw this. I`ll accept it now...sorry again ciuly :-)

I hope YOU can answer on my next question, pls ...

Thanks
0
 
LVL 28

Expert Comment

by:2266180
ID: 16944922
no problem. I'll try and see if I can make something out of it
0
 

Author Comment

by:crystyan
ID: 16944963
thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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