Response title
This is preview!
$(".button").click(function () { var val = $(this).attr("id"); //id have url value for game i want to install http://www......game.swf $.post('proces.php',{val: val},function(data){ $(".final_data").html(data); }); });
$link = $_POST['val']; // ...function remotefileSize($url) {$ch = curl_init($url);curl_setopt($ch, CURLOPT_NOBODY, 1);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);curl_setopt($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_MAXREDIRS, 3);curl_exec($ch);$filesize = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);curl_close($ch);if ($filesize) return $filesize;}$b = remotefileSize($igrica_mochi);$mb = $b / 1048576;echo round($mb, 2). " Mb<br>"; //round(1.95583, 2);echo $b. " bytes<br>";// ...
if (@copy($game_from_other_server, $game_in_my_server) ) { echo "- Finish!<br>"; }else{ echo "- Error.<br>"; $errors= error_get_last(); echo "- COPY ERROR: ".$errors['type']; echo "<br />\n".$errors['message']; }
Formula for calculating procent is
progres = (current / full) * 100
And question is value of 'current' :)
Yes, and this is clear, but problem is in calculating loaded value
© 2013 jQuery Foundation
Sponsored by and others.