XML AWS Redirected Feed Link not working

More
7 years 2 months ago - 7 years 2 months ago #3949 by jatoras
The script does not seem to follow the below link redirected to an amazon aws link Link: https://tool.045343768201a7c61ba964fe20f5/ when it follows any other link redirection like from http to https. Any help would be appreciated.
Last edit: 7 years 2 months ago by jatoras.

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #3952 by bram
If you server runs php in safe mode curl can't follow redirects

Please Log in or Create an account to join the conversation.

More
7 years 2 months 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 ?...
</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 ?....
</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.

Please Log in or Create an account to join the conversation.

More
7 years 2 months 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

Please Log in or Create an account to join the conversation.

Time to create page: 0.178 seconds