By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

How to Fetch a File from Remote Server to Local Server in ASP Classic?

nicebasic
P: 91
Hello everyone.

I wish to do Remote File Fetching in ASP Classic. Below is a very easy, but effective PHP Script which shows what I mean:

http://www.phpsnaps.com/snaps/view/f...emote-servers/

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if ($_GET[xfer]) {
  3. if ($_POST[from] == "") {
  4. print "You forgot to enter a url.";
  5. } else {
  6. copy("$_POST[from]", "$_POST[to]");
  7. $size = round((filesize($_POST[to])/1000000), 3);
  8. print "transfer complete.<br>
  9. <a><a href=\"$_POST[from]\">$_POST[from]</a><br>
  10. <a><a href=\"$_POST[to]\">$_POST[to]</a> : $size MB";
  11. }
  12. } else {
  13. print "<form action=\"$PHP_SELF?xfer=true\" method=post>
  14. from(http://): <input name=from><br>
  15. to(filename): <input name=to><br>
  16. <input type=submit value=\"transload\">";
  17. }
  18. ?>

I don't know how to copy a file from a Remote Server to my Local Host.

Does anybody know how to accomplish this in ASP Classic?
Mar 5 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.