I created a droplet in Digital Ocean and I have a code in PHP that uses curl to scrape a specific page.
When I created the server and configured it, the code works fine, but after a few requests it stops working. The curl doesn’t respond with the correct page, looks like there was a redirect to a wrong page.
I tried to destroy the droplet and start all over again, this time I created a snapshot of the droplet with code working, again after a few requests it stops working, I tried to restore to the snapshot, but it doesn’t work. Does anyone know what is happening? I think is some wrong or missing configuration, but I don’t figure out what is wrong.
I am using CentOS 7, apache, php 7.2
P.S.: The code works fine in other server that I use in a shared server in Hostgator, and works fine in localhost, too.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!