SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict adam2003w's Avatar
    Join Date
    Mar 2004
    Location
    colorado
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Google Search Script works on one server but not the other...

    PHP Google Search Script works on one server but not the other...

    I have a php script that uses soap to connect to the google api in order to search a domain (used as a site search). Lately i've noticed the script works on standard plan servers for Host 1 but not on e-commerce plan servers for Host 1. Also the script works fine on Host 2. I know I'm being a bit vague here, but I didn't write the script. I'm just wondering, would anyone off hand might now where to start to find the problem?

    Here are examples of the script working on Host 1's standard plan servers:
    http://www.htmlareaforum.com/htmlare...tml&q=htmlarea
    http://www.spidr.com/spidr/searchgoo...tml&q=analysis

    Here are examples of the script not working on Host 1's ecommerce plan servers:
    http://www.closeoutservices.com/clos...html&q=glasses
    http://www.ndcds.com/cds/searchgoogl....html&q=design

    Here are examples of the script working on Host 2's servers:
    http://www.kistlerrods.com/fishing-r...html&q=fishing
    http://www.sumner.com/sumner/searchg....0.html&q=jack

    Do you happen to know what may be the problem? Is there something I need to tweak in a php.ini file and put in each of my ecommerce domains? What do you think is goind on?
    Last edited by adam2003w; Jun 9, 2005 at 17:49. Reason: wrong title

  2. #2
    SitePoint Addict adam2003w's Avatar
    Join Date
    Mar 2004
    Location
    colorado
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone, Bueller?

  3. #3
    SitePoint Member Reaper2047's Avatar
    Join Date
    Jan 2005
    Location
    Tennessee
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow

    I don't know what script your using, BUT, the e-commerce server may have allow_url_fopen (I believe that's it) turned off, which won't allow you to open an external URI (from a URI other than your own)

    if that is the problem, a solution I have used is available here:
    http://blog.unitedheroes.net/archives/p/1630/

  4. #4
    SitePoint Addict adam2003w's Avatar
    Join Date
    Mar 2004
    Location
    colorado
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Reaper2047
    I don't know what script your using, BUT, the e-commerce server may have allow_url_fopen (I believe that's it) turned off, which won't allow you to open an external URI (from a URI other than your own)

    if that is the problem, a solution I have used is available here:
    http://blog.unitedheroes.net/archives/p/1630/
    Thanks, Reaper for your help. That wasn't it, but I found the solution:

    While looking for a solution to another script, I found out somehow the script was having trouble receiving posted variables from itself. Some fine fellow posted the following script that grabs posted variables:
    PHP Code:
    while(list($key,$val) = each($_POST)) 
    $
    $key $val
    while(list(
    $key,$val) = each($_GET)) 
    $
    $key $val
    Pasted that in the top of my script. Now everything works fine:

    http://www.closeoutservices.com/clos...0.html&q=photo
    http://www.ndcds.com/cds/searchgoogl....html&q=design

    Celebration!


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
  •