Skip to content

Tag: httprequest

Handling PHP URL and GET requests

I am currently parsing any given url, for example example.com/page/1 or example.com/api/info/1, by exploding the URL: and then accessing its elements in the array like so: But how could I handle (and access via array in the same way) a url that also includes GET elements, such as example.com/page?id=1 or exam…

Best way to manage long-running php script?

I have a PHP script that takes a long time (5-30 minutes) to complete. Just in case it matters, the script is using curl to scrape data from another server. This is the reason it’s taking so long; it has to wait for each page to load before processing it and moving to the next. I want to be able