Searching Web

Hello . Im using Delphi 6 , and i want to make a search in a web page ... and it will return me some variables ... i think i have to use nmhttp ... the site will be like google .. so i ll type the search word in a edit and it will return me some variables like url and other in a memo ... thnx a lot
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.


Use that page for a bit as user and study how they pass the search query, via Post or Get.
Use TIdHTTP to do the query in either case.



P.S. For further help, please specify the page.
fuscao_spAuthor Commented:
hi i wanna make a search in for my catalog in my video store ...
i wanna search the movie that will be typed in an edit .. and in a memo it will return genre , tagline , votes , rating , plot and cast .. then after i can treat it and add to my db ...



- 1 parameter containing the type( chosen among the ones displayed ) and called "Select".
- 1 parameter containing the name and called "For".

Use TIdHttp for it.


Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

fuscao_spAuthor Commented:
theres no chance you can post here an "trial" code so i can try to upgrade it ??? thnx a loot
fuscao_spAuthor Commented:
im having some problems to filter the data i reciveid ... can you help ??? thnx in advance

I'll try to post something tomorrow morning, ok?
I don't have a chance to try things out for today.

Or, send in the code you tried, so that we'll give a
look at it together.


fuscao_spAuthor Commented:
i have this to get rating year and name from a idtitle page ...

title1:=copy(title1,0,pos('<small>(<a href="',title1)-2);
year:=copy(year,pos(' <small>(<a href="/Sections/Years/',year)+34,length(year));
rating:=copy(memo1.Lines.text,pos('<b class="ch">User Rating:</b>',memo1.lines.text)+32,length(memo1.lines.text));
rating:=copy(rating,0,pos('alt="Vote Here" align="bottom"',rating)-34);
rating:=copy(rating,0,pos('<a href="ratings"><img',rating)-2);
rating2:=copy(rating,pos('</b> ',rating)+5,length(rating)+4);;

now i want to get writed by, plot info and hole cat ... but i cant hehehe ... thnx in advance ;)

Well, I gave an eye to the Post method in the IdHTTP component.
It's overloaded, so you have several versions, but in all of them there's a
string list parameter.

You can do something like this:

var Params : TStringList;

   Params := TStringList.Create;
   Params.Add( 'SELECT='+Selection );
   Params.Add( 'FOR='+Title );
   IdHttp1.Post(...,Params,nil );


Use a TStream in the third param if you want to get a result back.



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
fuscao_spAuthor Commented:
ok i ll accept it ;) but can you be more specific on how to get result back ??? im trying with no sucess getting cast and plot info .... the pages are not equal on diferent movies and what i tried doesnt work ... its like i post before ... thnx
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

From novice to tech pro — start learning today.