View Full Version : Grabbing Information

05-24-2004, 05:20 PM
Hello all...

I have a client who items for sale on their site. They sell books. The publishers of these books have websites from where we can get the book's cover images and the descriptions.

These books can be searched via an ISBN number (a 10 digit number) or by title.

Most of the sites utilize the GET method or have something like bookID="ISBN" in the URL... and so I can simply utilize the URL to find the page for the book and then subsequently grab the image url and description.

HOWEVER, I have quite a few sites that utilize the POST method and have no identifiable way to find the book page other than utilizing their Search then go to the page for the book.

The help I need is this... How can I grab a site's search page and submit to it so that I can then locate the url for the book, subsequently then I can find the image url and then the description.

Any ideas?


05-24-2004, 05:25 PM
can't you just look at the action-attribute of the formtag to see which page to post to?
+ look at the searchfield to know the name of the variables you need to post?

05-24-2004, 05:48 PM
Yes - I can do that and have done that... However, what I'm lacking is exactly how to post that info?

For instance, there are some that would be...

<form action=search.asp method=POST>

and maybe have an input of

<input type=hidden name=category value=something>

and maybe a

<input type=text name=searchText>

doing something like this:


doesn't work for most of the "POST" sites... that works fine when the site is using GET.

05-24-2004, 07:28 PM
This little function might help (found it searching through the php.net user comments under HTTP stuff)...