-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from qiniu/develop
Release v6.1.12
- Loading branch information
Showing
11 changed files
with
194 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
require_once('../qiniu/rs.php'); | ||
require_once('../qiniu/conf.php'); | ||
|
||
$client = new Qiniu_MacHttpClient(null); | ||
$ret = Qiniu_RS_Fetch($client, 'http://rwxf.qiniucdn.com/1.jpg', 'rwxf', 'qiniu.jpg'); | ||
|
||
var_dump($ret); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
require_once('../qiniu/rs.php'); | ||
require_once('../qiniu/auth_digest.php'); | ||
|
||
$gpy = new Qiniu_RS_GetPolicy(); | ||
|
||
$url = 'http://sslayer.qiniudn.com/dive-into-golang.pptx'; | ||
echo $gpy->MakeRequest($url, null); | ||
|
||
echo "\n"; | ||
$url = 'http://sslayer.qiniudn.com/dive-into-golang.pptx?odconv/pdf'; | ||
echo $gpy->MakeRequest($url, null); | ||
|
||
echo "\n"; | ||
$url = 'http://sslayer.qiniug.com/2.m3u8'; | ||
echo $gpy->MakeRequest($url, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
require_once('../qiniu/pfop.php'); | ||
require_once('../qiniu/http.php'); | ||
|
||
$client = new Qiniu_MacHttpClient(null); | ||
|
||
$pfop = new Qiniu_Pfop(); | ||
|
||
$pfop->Bucket = 'rwxf'; | ||
$pfop->Key = '1.mp4'; | ||
|
||
$savedKey = 'qiniu.jpg'; | ||
$entry = Qiniu_Encode("$pfop->Bucket:$savedKey"); | ||
$pfop->Fops = "vframe/jpg/offset/180/w/1000/h/1000/rotate/90|saveas/$entry"; | ||
|
||
list($ret, $err) = $pfop->MakeRequest($client); | ||
echo "\n\n====> pfop result: \n"; | ||
if ($err !== null) { | ||
var_dump($err); | ||
} else { | ||
var_dump($ret); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
require_once('../qiniu/auth_digest.php'); | ||
require('../qiniu/http.php'); | ||
|
||
$url = 'https://10fd05306325.a.passageway.io/chgm/aXRpc2F0ZXN0OmdvZ29waGVyLmpwZw==/mime/YXBwbGljYXRpb24vdGVzdA=='; | ||
$u = array('path' => $url); | ||
$req = new Qiniu_Request($u, ''); | ||
$mac = Qiniu_RequireMac(null); | ||
|
||
echo $mac->SignRequest($req, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
require_once('../qiniu/io.php'); | ||
require_once('../qiniu/rs.php'); | ||
|
||
$bucket = 'rwxf'; | ||
$key = 'up.php'; | ||
$file = <path_to_local_file>; | ||
|
||
|
||
$client = new Qiniu_MacHttpClient(null); | ||
$putPolicy = new Qiniu_RS_PutPolicy("$bucket:$key"); | ||
$putPolicy->CallbackUrl = 'https://10fd05306325.a.passageway.io'; | ||
$putPolicy->CallbackBody = 'key=$(key)&hash=$(etag)'; | ||
$upToken = $putPolicy->Token(null); | ||
|
||
$putExtra = new Qiniu_PutExtra(); | ||
$s = time(); | ||
list($ret, $err) = Qiniu_PutFile($upToken, $key, $file, $putExtra); | ||
echo "time elapse:". (time() - $s) . "\n"; | ||
echo "====> Qiniu_PutFile result: \n"; | ||
if ($err !== null) { | ||
var_dump($err); | ||
} else { | ||
var_dump($ret); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.