Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
Hello,
I'm interested on using PHP Client over my KalturaCE server. In Wiki Kaltura pages there are a link to a startingphpuse, but it isn't working.
Is there any example of the complete process of uploading a media file using php client over KalturaCE server?
Thank you very much
Well,
The page api_v3/sample/add_media.php is an example of KCW and not of the API PHP Client. And I can't see the php source and so I can't re-use it.
I'm looking for the process for uploading media using the PHP API, I supose that it was something like:
- create configuration
- create session
- uploading media
But Ilove to see an php example with the functions and variables used.
Thank you very much
So you want to upload to Kaltura using ONLY the API (i.e. it will be done all via code - no user interaction)? My suggestion would be to generate a CSV file using PHP (that points to the file you want to upload that's accessible on the web), then use the BulkUpload API call. For further information see:
http://www.kaltura.com/api_v3/testmeDoc/index.php?service=bulkupload&act...
Why can't you see the PHP source? As explained, just look at the source code located in the api_v3/sample folder of your Kaltura CE installation.
Also, for general information on the API, have you had a look at:
Thank you,
I'm doing my first php script:
$config = new KalturaConfiguration(KALTURA_PARTNER_ID);
$client = new KalturaClient($config);
$ks = $client->session->start(KALTURA_PARTNER_WEB_SERVICE_SECRET, $partnerUserID, KalturaSessionType::ADMIN);
$result = $client->media->upload('video.avi');
I have a ks, but when I use "$client->media->upload" I get: "Missing KS. Session not established". Why?
I know this is an old post but in case anyone else googles this, it looks like you are missing the call to setKs:
$config = new KalturaConfiguration(KALTURA_PARTNER_ID);
$client = new KalturaClient($config);
$ks = $client->session->start(KALTURA_PARTNER_WEB_SERVICE_SECRET, $partnerUserID, KalturaSessionType::ADMIN);
$client->setKs($ks);
$result = $client->media->upload('video.avi');
Sorry - I completely forgot about the "upload" API call...
Are you using APIv2 or APIv3?
What's the result of $ks? Are you sure a session was created successfully?
hey veo
when you use the upload call it should return a filename, usually a random string of letters with an flv extension. This is called a "file upload token". if you call the addFromUploadedFile api function with this file upload token as an argument it should return an entryID and add the file to the server
Thanks- mikejpeters. Was having the same problem and your solution worked.
Hi All,
Is there any example to upload and addentry for kaltura server.
I am new in kaltura trying to upload media file. its not uploaded.
The code
require_once("kaltura_client.php");
$conf = new KalturaConfiguration(x, xxx);
$user = new KalturaSessionUser(2);
$cl = new KalturaClient($conf);
$secert = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$cl->start($user, $secert);
$entry = new KalturaEntry();
$rs = $cl->upload($user,'NGC.wma');
print_r($rs);
I can not get any response to proceed for Add entry on kaltura server.
Please help me.
@ndixit
$rs = $cl->upload($user,'NGC.wma');
should read:
$rs = $cl->media->upload($user,'NGC.wma');
then with the response call the addfromuploadedfile command
Have a look at:
http://www.kaltura.com/api_v3/sample/add_media.php
On your Kaltura CE installation, look at the source code in the api_v3/sample folder.