开发者

Whats the best way to do an external search with dynamique content?

I would like to build an external search function for other websites to be able to search in my database. Now the problem I have is that there are several drop down boxes which have a dynamique content, whi开发者_运维百科ch means, the content comes from a database. This would only work if the external search plugin includes a php file which gets the content from the database. But now imagine someone who doesnt use php wants to put the search on his website. He couldnt.

How would you do it instead?


Maybe I'm missing the point, but why could you not put some CGI behind the "search the phpheini database" link? That CGI could search anything, including especially the dynamic content of any dropdowns or anything else.

Sorry if I've misunderstood, but I just don't see any problem.

-- pete


Maybe something like this:

I believe that to get your form into the page his browser is displaying, he has to include some JavaScript that belongs to you, JavaScript that comes from your site. So he has to have in his <head> a line like:

  <script type="text/javascript" 
  src="http://www.phpeini.com/the_html_for_the_already_populated_dropdown.js">
  </script>

If you can get the guy to do that -- to include that <script> -- then you have the one and only hook you need to get control from him (when he clicks one of the selections) and to return him whatever he's asked for.

Forget about any PHP. He doesn't need PHP to just retrieve the dropdown(s), he just needs that one line of <script>.

Am I way off base here? I apologize if so for wasting your time.

-- pete

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜