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
336 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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