XML AWS Redirected Feed Link not working

4 years 1 month ago - 4 years 1 month ago #3949 by jatoras

The script does not seem to follow the below link redirected to an amazon aws link Link: http://tool.045343768201a7c61ba964fe20f5/ when it follows any other link redirection like from http to https. Any help would be appreciated.



  • Posts: 27
  • Thank you received: 2

  • Gender: Male
  • Birthdate: 12 Oct 1982
  • Last Edit: 4 years 1 month ago by jatoras.

    Please Log in to join the conversation.

    4 years 1 month ago #3952 by bram

    If you server runs php in safe mode curl can't follow redirects



  • Posts: 1494
  • Karma: 57
  • Thank you received: 247

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in to join the conversation.

    4 years 1 month ago #3955 by jatoras

    My server settings are fine and i never ever run php in safe mode. The thing is that when curl -L follows redirects, just curl does not but it just gets the html-->
    **********************
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8" />
    <meta http-equiv="refresh" content="1;url=https://cb-private-bucket.s3-eu-west-1.amazonaws.com/2015/09/15/55f739a9bb7a7.gz?..." />

    <title>Redirecting to cb-private-bucket.s3-eu-west-1.amazonaws.../15/55f739a9bb7a7.gz ?...</title>
    </head>
    <body>
    Redirecting to <a href=" cb-private-bucket.s3-eu-west-1.amazonaws.../15/55f739a9bb7a7.gz ?..."> cb-private-bucket.s3-eu-west-1.amazonaws.../15/55f739a9bb7a7.gz ?...</a>.
    </body>
    ***********************

    That is what our script fetches(except for http-to-https redirects).

    I tried some alterations to the parse-fetch scripts without success. So any suggestions will be appreciated.



  • Posts: 27
  • Thank you received: 2

  • Gender: Male
  • Birthdate: 12 Oct 1982
  • Please Log in to join the conversation.

    4 years 1 month ago #3956 by bram

    Sorry,

    my mistake the problem would be a base dir restriction (Open_basedir) that one limits curl the php equivalent of -L is not possible

    You would need to create a seperate cronjob using curl directly fetching and storing the file on your servers disk. Then use the local file

    You can access the file directly using the absolute path for example

    curl -L <feed> -o /home/users/public_html/tmp/feed.gz

    and in as feed-url : /home/users/public_html/tmp/feed.gz



  • Posts: 1494
  • Karma: 57
  • Thank you received: 247

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in to join the conversation.

    Time to create page: 0.038 seconds
    Powered by Kunena Forum