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
335 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
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

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…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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