SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2011
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    connect to other websites using php

    Hi,
    If we give any word to search engine we get the required results.But is it possible to send a word as input to the search engine through php coding.

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Many search engines provide an API for this, a quick (pardon the pun) search should help out.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Search APIs - using probably the most celebrated use of just adding GET commands to build a search string.

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the algorithms with API searches are the best

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Location
    Kolkata, India
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Simpler way can be used for search engines like Google. Simply create an HTML form with an input text field and submit button and send the search string in GET method to the search result page. An example code for Google Search using plain HTML is given below.

    HTML Code:
    <form method="get" action="http://www.google.com/search">
    <input type="hidden" name="hl" value="en" />
    Text To Search : <input type="text" name="q" />
    <input type="submit" value="Search" />
    </form>
    $0.50/Mo for 500MB Web hosting Kolkata
    Web design in Kolkata
    Website development company in Kolkata

    Hostgator 25% Discount Coupon wow25percent

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2011
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Thanks for ur reply.We can post a keyword to google usign the method you have suggested(Form).How to retreive the result using the coding.I need first 5 results(Links).

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Location
    Kolkata, India
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Santhana Lakshmi View Post
    Hi,
    Thanks for ur reply.We can post a keyword to google usign the method you have suggested(Form).How to retreive the result using the coding.I need first 5 results(Links).
    Although I'm not sure, but I think you're not allowed to parse Google Search Result page and retrieve the listed links in any form, or for any purpose. So, you've to use Google Search API to retrieve Google Search results and use it in your own way. The way I've shown is for implementing a simple Google search page on your site. But you should not parse the search result page of Google, instead of using Search API. View the API docs here Developer&#39;s Guide - Google Web Search API - Google Code although Google claims that this is the deprecated version of API.
    $0.50/Mo for 500MB Web hosting Kolkata
    Web design in Kolkata
    Website development company in Kolkata

    Hostgator 25% Discount Coupon wow25percent


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •