Click to See Complete Forum and Search --> : Locating a search box


Dragonkai
06-21-2007, 11:26 PM
I've been looking around for PHP functions that do this..

Basically lets say a site has a search box, that maybe a google search box, their own search box, or javascript search box.

Then theres my site, now I want to execute a query to that site to tell me if that particular site has a search box, and what kind of search box it has and all the other detailed information.

Could someone give me a code snippet and point me to the right direction?

Or should I even be using PHP for this, can perl do this? If so easier or harder? Faster results or slower?

Sheldon
06-21-2007, 11:29 PM
Why? you could use fsocketopen

Dragonkai
06-21-2007, 11:36 PM
Why, because I want to be able to auto query a site that I have partnered up with.

Could you tell me how to use the fsocketopen()?

Seemingly there's alot of parameters in fsocketopen function. What options should I put in to have a correct choice of how I should connect.

Also, how should I proceed to find out about how to check if they have a search box or not. Is it just a case of seeing their source code and to see if they have a specific code in it and then return true?

If that's how you do it what is the PHP function that does that?

Oh I just realized that seemed a bit dodgy. Like why I should check if I have partnered up with them, well you see I need to locate their searchbox to input variables into it, and that's why I wanted the function that does that.

Sheldon
06-21-2007, 11:47 PM
If you have partnered with the site, then just link your search form with the processing page of the partner site, would be the easiest by miles.

If it doesnt make sense, post a link to your site and a partner site.

Dragonkai
06-21-2007, 11:50 PM
Yes, but I need to query multiple sites that I have partnered up with. Its kind of like a aggregation thing. I then rank the results basically and thats why I can't just search for one site.