how do i fix this error?

Discussion in 'PHP' started by mattonline, Mar 28, 2008.

  1. #1
    I have this error on my site

    Quote:


    Warning: file_get_contents(http://rss.api.ebay.com/ws/rssapi?F...&from=R6&fss=0&sacur=0&afcj=2927014&SID=Brand name-golf-bags-adid&saslc=0&fcl=3&saaff=afcj&catref=C5&frpp=100&satitle=+golf%2B&ftrv=1&fts=&salic=3&sascs=0&fspt=0&fpos=&sadis=25&frts=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/golf/public_html/index.php on line 1181

    No products matching your query have been found in our store. Please bookmark this page and come back soon to see if we have what you want.


    I found that error on this page

    http://www.hybridgolfclub.co.uk//Brand name-golf-bags-adidas-nike-umbro-tiger woods


    -------


    and this error

    Quote:


    Warning: file_get_contents(http://rss.api.ebay.com/ws/rssapi?F...&from=R6&fss=0&sacur=0&afcj=2927014&SID=Brand name-Golf-Shoes-tig&saslc=0&fcl=3&saaff=afcj&catref=C5&frpp=100&satitle=+hybrid%2B&ftrv=1&fts=&salic=3&sascs=0&fspt=0&fpos=&sadis=25&frts=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/golf/public_html/index.php on line 1181

    No products matching your query have been found in our store. Please bookmark this page and come back soon to see if we have what you want.


    on this page
    http://www.hybridgolfclub.co.uk//Brand name-Golf-Shoes-tiger woods golf shoes-nike golf shoes-hybrid

    All my other pages work, take a look
    http://hybridgolfclub.co.uk

    thanks again
     
    mattonline, Mar 28, 2008 IP
  2. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to fix your handling of spaces (e.g., "Brand name"). You can urlencode the string or manually convert them to %20.
     
    Gordaen, Mar 28, 2008 IP
  3. singh.ajit05

    singh.ajit05 Peon

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This problem comes alway when the specified path was not found. So please try to check first the given url is there or not? And then run this script.
     
    singh.ajit05, Mar 28, 2008 IP