Search Engine Script - no results

Discussion in 'Products & Tools' started by aseath, Sep 19, 2005.

  1. #1
    having followed the instruction on setup.html, when I try a search all I get is :
    Estimated Total Results: 0
    Did you mean: a

    Doesn't matter what I put in the the search box?????

    Someone please help
     
    aseath, Sep 19, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    What's your site URL?
     
    digitalpoint, Sep 19, 2005 IP
  3. aseath

    aseath Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    http://www.borderscollege.ac.uk/index2.php

    Thanks for your assistance
     
    aseath, Sep 19, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Have you changed anything within the search.php file other than the $site variable and adding your Google API key?
     
    digitalpoint, Sep 19, 2005 IP
  5. aseath

    aseath Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I was getting error messages and had to change the following line

    eval ('$urls = '.$line.';');

    to

    eval("\$urls = \"".$line."\";")

    Appart from that I inserted my google API and set

    $site = "www.borderscollege.ac.uk";
     
    aseath, Sep 19, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    To be honest, I'm not really sure... everything looks good on this end (as far as the request your server is making).

    What error were you getting with the eval() line? That might be the problem...
     
    digitalpoint, Sep 19, 2005 IP
  7. aseath

    aseath Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/sites/site112/web/search_new.php(50) : eval()'d code on line 2

    Parse error: parse error in /home/sites/site112/web/search_new.php(50) : eval()'d code on line 45


    I have re-uploaded the original search.php file. If you try a search you will see the exact error.
     
    aseath, Sep 19, 2005 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    Try changing the line to this:

    eval ('$urls = ' . stripslashes ($line) . ';');
    PHP:
     
    digitalpoint, Sep 19, 2005 IP
  9. aseath

    aseath Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Shawn you are a star

    Working as it should.

    Many thanks

    Alan
     
    aseath, Sep 19, 2005 IP