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
337 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
  • 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

697 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