PHP Coder Needed , Download Script Tweak.

Discussion in 'Programming' started by jags2ooo, Jun 25, 2008.

  1. #1
    I am need of a Good PHP Programmer.

    I have a download php script on one of my sites:

    Basically The file name + file size gets stored in the database, when a person clicks the download links: the script sends the browser the file name + file size via HEADERS.


    example:
    		$t = mysql_fetch_array(mysql_query("SELECT * FROM `ga_tickets` WHERE `code` = '{$_GET['code']}' LIMIT 1"),MYSQL_ASSOC);
    
    	if (($t['time'] >= $time-(60*60*24*7*2))||($t['username']==$_GET['user'])||($t['fileid']==$_GET['id'])){
    		
    		 ob_start();
    		#$deleteticket = mysql_query("DELETE FROM ga_tickets WHERE id= '{$t['id']}'  LIMIT 1");
    		$file = mysql_fetch_array(mysql_query("SELECT * FROM ga_files WHERE id= '{$_GET['id']}'  LIMIT 1"),MYSQL_ASSOC);
    		$mtype=$type[$file['extension']];
    				
    		header("Cache-Control: public, must-revalidate");
    		header("Pragma: no-cache");
    
    		header("Content-Type: $mtype");
    		header("Accept-Ranges: bytes");
    		header( "Content-Disposition: filename='".$file['filename']."';" );
    		header( 'Content-Disposition: attachment; filename="'.$file['filename'].'"');
    		header("Content-transfer-encoding: binary");
    		header("Content-Length: {$file['filesize']}");
    		ob_end_clean();
    
    		$updatedls = mysql_query("INSERT INTO ga_downloads (filename, filesize, username, timestamp) VALUES ('{$file['filename']}','{$file['filesize']}','{$_GET['user']}','{$time}')");
    		$insertdownloads = mysql_query("update ga_files set download_count = ( download_count + 1 ) WHERE id = '{$_GET['id']}' LIMIT 1");
    		readfile("bin/".$file['series']."/".$file['filename']);
    			
    Code (markup):
    The download system uses a ticket that lasts a week so the same url should still work but some reason download managers wont allow it to resume.

    I need someone who can tweak the script so Download Managers + File download Resuming can work.

    PM ME with details.
     
    jags2ooo, Jun 25, 2008 IP
  2. jags2ooo

    jags2ooo Well-Known Member

    Messages:
    335
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    145
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Pm me If your able to do this and how much you charge.
    Paying VIA Paypal.
     
    jags2ooo, Jun 26, 2008 IP
  3. jags2ooo

    jags2ooo Well-Known Member

    Messages:
    335
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    145
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Got someone, job complete.
     
    jags2ooo, Jun 27, 2008 IP