PHP curl script "requested URL was rejected"

Discussion in 'PHP' started by FunkyFresh, Oct 8, 2011.

  1. #1
    I need help getting my script to work again. It used to work before but now I keep getting this error:

    "The requested URL was rejected. Please consult with your administrator.

    Your support ID is: 34231216740623451231."

    Any help or advice on how to fix this would be appreciated.
     
    FunkyFresh, Oct 8, 2011 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,784
    Likes Received:
    4,528
    Best Answers:
    123
    Trophy Points:
    665
    #2
    double check everything but it's possible there is a check code in the form that you have missed or else they are checking the referrer which isn't showing as their page. You will need to spoof it - or take the hint that they don't want you scraping their pages.
     
    sarahk, Oct 8, 2011 IP
  3. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Where exactly are you trying to post? We can help you out if you provide us with the complete details
     
    maestria, Oct 9, 2011 IP
  4. JohnnySchultz

    JohnnySchultz Peon

    Messages:
    277
    Likes Received:
    4
    Best Answers:
    7
    Trophy Points:
    0
    #4
    re-check your code, there might be a new requirement in the data that is posted on the URL that you are accessing or the url is not available anymore..

    or if the page your accessing is not yours, you might be blocked.
     
    JohnnySchultz, Oct 10, 2011 IP
  5. DrLiz

    DrLiz Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    The website likely is blocking unknown browsers. Found that this flag helps:
    curl --user-agent "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
     
    DrLiz, Sep 8, 2015 IP
  6. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #6
    They are blocking bots/scrapers and similar, most likely because they don't want you to scrape their site this way. You should contact the site owner and ask them for the right way to access their data. They might have an API, for example, if they are a site that is happy to share their data.
     
    ryan_uk, Sep 8, 2015 IP