Jump to content

foxclone

New Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About foxclone

  • Rank
    Newbie
  1. I'm trying to get the filesize() of a file based on a retrieval of filename from the database. The file is located in the download directory and the code calling the function is in the root of the website. Here's the code I've tried: $test = $pdo->query("SELECT filename FROM files WHERE id =1"); $isoname = $test->fetchColumn(); $test = "download/".$isoname; $isosize = filesize($test)/1000000; It always returns zero although is returns the correct filename. Thanks for any guidance in advance.
  2. @Barand - Thanks for putting me on the right track, it's fixed.
  3. @Barand - Thanks for jumping into this. Why not have the U.S. server handle the DB transactions prior to handing off to the U.K. server? If it has to be the way you describe, how would I code the DB transactions on the U.K. side to update the U.S. side DB? All that's on the U.K. side is a copy of the download folder.
  4. I can put a download script similar to the one on the U.S. download, but without the database actions. Currently, I just give them the URL for the U.K. server via email when they report a download problem via the Contact Us page. I'm trying to avoid having to do that by giving them the choice of where to download from. The database actions would still have to take place on the U.S. server regardless of where they download from.
  5. @requinix - on the U.S. side, that's where the download happens. I just don't know how to code it to download from the remote server. Here's the code where the buttons calls these scripts which are located in the download folder: <a href="download/usdloader.php?f=<?php echo $isoname;?>"><center><img src="images/us_download.png" style="height:44px; width:144px;" alt="download iso"> </center></a> <br /> <a href="download/ukdloader.php?f=<?php echo $isoname;?>"><center><img src="images/uk_download.png" style="height:44px; wid
  6. @gw1500se - Are you proposing using the jquery as a solution to the download problem for large files or as a solution to download from the remote server? @requinix - yes, that was the idea, to have a mirror of the main download folder. I've created two buttons, one to download from the U.S. site, and one to download from the U.K. site but don't know how to code the download link in the code I've posted for the U.K. site.
  7. On my website, I have a download folder containing several files ranging in size from 6Mb to 700Mb. Users have no problems downloading the smaller files but often have problems downloading the files over 500Mb. We also have an archive of all the files located on a sub-domain on a server in England. Those users that are having problems downloading large files from the main site usually have no problem downloading the large files if we send them the URL for the archive. I've added a button that calls the following script so the users can choose where to download from but have no idea how to code
  8. I'd like to merge the following function into my main download page but can't figure out how to do it. I've modified the main download page to do the actual downloads but how to manage making the database entries for each download is the problem. I guess I could use a case statement at the end of download.php to set $l_filename then run the pdo sql code. mydownloader.php - Currently located in download directory <?php $php_scripts = '../../php/'; require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . 'GetUserIpAddr.php'; function mydloader($l_filename=NULL) {
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.