I'd be much appreciative if someone could explain to me how curl is getting two different results from what I feel should be similar commands.
I have a php script which returns a daily extract upon accessing a semi-public (open but not indexed) URL. We've started collecting more sensitive information and need it secured.
I've been successfully collecting the information via Curl thusly:
curl -o C:\localdirectory\extract.csv http://foo.bar/daily_data_extract.php
I have access to the site assets of course, via SFTP and I figured the commmand would work like this:
curl -o C:\localdirectory\extract.csv sftp://user:pass@foo.bar/blah/htdocs/daily_data_extract.php -k
But this doesn't seem to work. I'm just getting the PHP code downloaded as a CSV and not the results I need. I'm new to Curl and previously just used wget (which doesn't support SFTP to my understanding).
I'd appreciate the pointers on what I'm missing!