<?php                
                
if(!function_exists('curl_init')) { die('CURL functions are not available. Debian: apt-get install php5-curl');} 
                
                
$file_path ''// Example: $file_path = '/home/files/file.exe';
                
$token =     ''// You can get your TOKEN from the following page  http://vshare.io/api.html
                
$post = array(
                            
'token'=>$token,
                            
'filesize'=>filesize($file_path),
                            
'Filedata'=>'@'.$file_path
                        
);
                
// init 
                
$ch curl_init();
                
curl_setopt($chCURLOPT_URL,'http://upload.vshare.io/upload_api.php');
                
curl_setopt($chCURLOPT_POST,true);
                
curl_setopt($chCURLOPT_HEADERfalse);
                
curl_setopt($ch,CURLOPT_HTTPHEADER,array("Expect:  "));
                
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
                
curl_setopt($chCURLOPT_POSTFIELDS$post);
                
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue); 
                
$result=curl_exec ($ch);
                
curl_close ($ch);
                
$output json_decode($result,true);
                if(isset(
$output['upload'],$output['video'],$output['fileid']) && strlen($output['fileid']) == && $output['upload'] == 1) {
                    if(
$output['video'] == '1') {
                        
$file_type 'video';
                    } elseif(
$output['video'] == '0') {
                        
$file_type 'file';
                    }
                    echo 
'File Type: '.$file_type.' | File Link: http://vshare.io/d/'.$output['fileid'];
                } else { echo 
'Error: '.$output['msg']; }
?>