I want to download "Bhavcopy.cvs" file form "bseindia.com" on everyday at 5 pm. automatically.
So, I want php code that automatic download this file from "nse" website...
Please help.. The URL goes as follows
http://www.bseindia.com/download/BhavCopy/Equity/EQ140316_CSV.ZIP
I want to build an automated function to automatically upload reports from a URL at end of the day if found on that URL. My question is the URL keeps changing daily with a date.
I want to download this in csv and save it to my server automatically..A quick help will be really appreciated. Thanks in advance

I assume the last part of the URL, the file name, is just the date with 'EQ' in front?
If not, especially if there is no logic to file name, you'll have trouble.

Otherwise you can get the file now with:
$file = "EQ" . Date('dmy') . "_CSV.zip";
$url = "http://www.bseindia.com/download/BhavCopy/Equity/$file";

To save the file:
file_put_contents($file, fopen($url, 'r'));

Or you can use fopen to open the file and write it to folder using fwrite.

The file on the server has to exist of course and, depending on the size, you have memory issues and need to look at

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.