Skip to content

Instantly share code, notes, and snippets.

@msg7086
Created October 9, 2013 10:35
Show Gist options
  • Save msg7086/6899293 to your computer and use it in GitHub Desktop.
Save msg7086/6899293 to your computer and use it in GitHub Desktop.
<?php
// 略
if($filesize > 262144)
{
echo 'Try rapid uploading...', PHP_EOL;
// Try rapid upload
$fp = fopen($fn, 'rb');
$data = fread($fp, 262144);
fclose($fp);
$md5s = md5($data);
echo $md5s . PHP_EOL;
$ret = $pcs->cloudMatch($remote_path . basename($fn), $filesize, $md5, $md5s, $crc32);
$retj = json_decode($ret, true);
print_r($retj);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment