Jump to content

Download file from URL and save to my folder on server


SVKpneux

Recommended Posts

Hi

 

Pls, help me. I need som code, that download file from URL (of my supplier) to my folder. And then, I set cron job for this php code. (actualization mount of product)

I try some codes, but still no success.

<?php
    download_remote_file('http://examplewebsite.sk/quantity.csv' realpath("./downloads") . '/file.csv');
?>

 

<?php
    download_remote_file_with_curl('http://examplewebsite.sk/quantity.csv' realpath("./downloads") . '/file.csv');
?>

 

<?php
    download_remote_file_with_fopen('http://examplewebsite.sk/quantity.csv' realpath("./downloads") . '/file.csv');
?>

 

Thanks a lot.

Peter

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...