I’ve an .csv file which contains hundreds of URLs. I’ve to write a PHP script which will read the file then loop through all the URLs.
In the loop each URL should automatically hit(like we type the URL in browser’s address bar and press enter button), the response received after hitting the URL has to be written into a new .csv or .txt file in the following way:
Request URL, Response received
At the end of loop each request URL and its respective response should be written to a .txt or .csv file. The response is surely going to be in the csv format in one liner. So no validation is required while writing the response to the file.
I did lot of search on google on it, but couldn’t get the useful solution. Could anyone help me to solve this issue?
Thanks in Advance.
you will probably find the following functions useful :
Look at PHP Manual to get details on how to use these functions but they are pretty “basic”