</div>
</div>
<div class="grid--cell mb0 mt8">Closed <span title="2012-01-12 13:37:27Z" class="relativetime">8 years ago</span>.</div>
</div>
</aside>
Possible Duplicate:
Upload Progress Bar in PHP
I have been researching this with no success.
I have a php script which uploads a picture to Facebook. On the main page I want to show a button or a link or an image which starts a progress bar and runs the upload script at background.
Here is the upload.php file:
<?php
include_once 'facebook.php';
include_once 'config.php';
$facebook = new Facebook(array(
'appId' => FACEBOOK_APP_ID,
'secret' => FACEBOOK_SECRET_KEY,
'fileUpload' => true,
));
$uid = $facebook->getUser();
$me = $facebook->api('/me');
$FILE = "images/$uid.jpg";//the file is already stored
$args = array('message' => 'Check yours on: http://apps.facebook.com/dec-death');
$args['image'] = '@' . realpath($FILE);
$data = $facebook->api('/'.$uid.'/photos', 'post', $args);
echo 'Picture has been uploaded';
?>
</div>
There is nothing to do with these you tagged! alternatively you can make an ajax call. so before ajax call you will start animation and on end you will hide/complete the animation!
You would need to call your upload script via AJAX (Asynchronously) , and get the upload status during the upload to present a progress bar. There are great jQuery plugins already doing that such as Uploadify
As one already commented here, this was asked so many times - So please next time just search before posting.