This file contains hidden or 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
<?php | |
require_once 'Dailymotion.php'; | |
// ----- account settings -----// | |
$apiKey = 'yourApiKey'; | |
$apiSecret = 'yourApiSecret'; | |
$testUser = 'someUser'; | |
$testPassword = 'yourPassword'; | |
$videoTestFile = '/path/to/video/test.mp4'; |
This file contains hidden or 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
<?php | |
// Using php-sdk | |
$api->delete('/video/' . $videoId); | |
?> |
This file contains hidden or 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
<html> | |
<head> | |
<script src="http://api.dmcdn.net/all.js"></script> | |
<script> | |
DM.init({ | |
apiKey: 'XXXXXXXXXXXXXXXXXXX', | |
status: true, // check login status | |
cookie: true // enable cookies to allow the server to access the session | |
}); |
This file contains hidden or 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
<?php | |
// Using our php-sdk | |
$api->post( | |
'/video/' . $videoId, | |
array('title' => 'New Title', | |
'description' => 'New Description', | |
.... | |
) | |
); |
This file contains hidden or 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
<?php | |
// Using php sdk | |
$url = $api->uploadFile($testVideoFile); | |
$api->post( | |
'/videos', | |
array('url' => $url, | |
'title' => 'PHP SDK test upload', | |
'published' => true, | |
'channel' => 'videogames') |