Closed GoogleCodeExporter closed 9 years ago
Hi Tyrantpimp,
please read the code carefully and not just copy/paste ;)
Actually the code seems fine except here :
$token = md5($secret . $filename. $hexTime);
notice the $filename var, it's declared as $fileName (the N in uppercase).
Correcting documentation thanks.
Original comment by teixeira...@gmail.com
on 21 Apr 2010 at 7:01
Sorry for the typo, I tried several different methods but posted the sample
code for
sake of simplicity. With new code
<?php
// Settings to generate the URI
$secret = "test"; // Same as AuthTokenSecret
$protectedPath = "/fyc/"; // Same as AuthTokenPrefix
$hexTime = dechex(time()); // Time in Hexadecimal
$fileName = "/video-1b.flv"; // The file to access
$token = md5($secret . $fileName. $hexTime);
// We build the url
$url = $protectedPath . $token. "/" . $hexTime . $fileName;
echo $url;
?>
I am still encountering the same problems
Original comment by tyrantp...@gmail.com
on 21 Apr 2010 at 7:27
Also if you updated the sample code you might want to revisit this portion
-----------------------------------
// We build the url
$url = $protectedPath . $token. "/" . $hexTime . $filename;
echo $url;
?>
-----------------------------------
you have $filename here as well instead of $fileName
Original comment by tyrantp...@gmail.com
on 21 Apr 2010 at 8:36
Original issue reported on code.google.com by
tyrantp...@gmail.com
on 21 Apr 2010 at 1:27