Searching

Discussion in 'PHP' started by barbarosreis, May 18, 2007.

  1. #1
    hi,
    I have a problem with search system.
    if anyone tell me how tomake a search system which makes search other sites and gets something and shows in my page i will be so happy.:D

    i.e
    i will search 'x' and it goes and search 'x' at www.blabla.com and it will show some info taken www.blabla.com.

    PLZ
     
    barbarosreis, May 18, 2007 IP
  2. xooMan

    xooMan Peon

    Messages:
    92
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    First of all, you have to read the page by using file_get_contens() or fsockopen()/fread().

    Then, you have to find the search words by using strstr() or something similar.
     
    xooMan, May 18, 2007 IP
  3. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #3
    first make a search in blabla.com and see what is it URL it may be like blabla.com?src='keywords'&p=1 etc.
    so from here you will know which URL you have to use to make the search in blabla.com.
    now from your site use file_get_contents() which will return a string(it is the easiest) to get the whole search result page from blabla.com.then you just echo them in a page.you get the search result in your page!!but it will have blabla.com's images and links etc.to make a filter for just getting the results you have use string operations.
     
    coderbari, May 19, 2007 IP
  4. barbarosreis

    barbarosreis Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thank you very much.
     
    barbarosreis, May 19, 2007 IP