Wowza Live Cam Secure Expired Token

wowza-live-cam-secure-expired-token.php // Encrypt original stream URL http://wowza-server:port/stream/playlist.m3u8 $base64ized = encryptDecrypt($secret_key, $streamURL, 0); // Decrypt stream URL $streamURL = encryptDecrypt($secret_key, $base64ized, 1); stream.php // Expire stream URL after time interval & check secure token if (($current – $timestamp)

Creating Zip Without Recording ROOT Paths

Simply use chdir() to change the working directory before you exec() Or you can use …. exec(“cd /var/www/html/media; zip -r -9 Media.zip . 2>&1”, $log); exec(“mv /var/www/html/media/Media.zip /var/www/html/Media.zip”); Get zip file size exec(“ls -ls /var/www/html/Media.zip | awk ‘{print $6}’ 2>&1”, $size); $zipsize = implode(” “, $size); Without this solution Length Date Time Name ——– —- … Read more

Best PHP Encryption Decryption

I was working on Secured & Expired MP3 Link in HTML5 MP3 Player. Hope you already read previous article “Amazon S3 Expiring Link” You can use below code for hiding real mp3 link inside html source using base64_encode, mcrypt_encrypt, base64_decode, mcrypt_decrypt and md5. This function is also useful when you need to secure & expire … Read more

Amazon S3 Expiring Link

I was working on Amazon S3 Cloud HTML5 MP3 Player for S3 Bucket security and Expiring Media links. <?php   if(!function_exists(‘el_crypto_hmacSHA1’)){       /**       * Calculate the HMAC SHA1 hash of a string.       *       * @param string $key The key to hash against       * @param string $data The data to hash       * @param int $blocksize Optional blocksize       * … Read more

PHP Run Background Process using Exec

If you need to start process in background and get its PID to manage it later using PHP. <?php function runInBackground($command,$log,$priority=0) { if($priority)    $PID=shell_exec(“nohup nice -n $priority $command > $log 2>&1 & echo $!”); else    $PID=shell_exec(“nohup $command > $log 2>&1 & echo $!”); return($PID); } ?> echo $! will return process ID # Command & … Read more

Install Apache, PHP, MySQL on HP Cloud

I am playing with all cloud services these days, so today we will try to setup Apache, PHP, MySQL on HP Cloud. HP Cloud is based on OpenStack Compute Hope you already read our old article “Installing Apache, MySQL, PHP in CentOS 5.5 on Rackspace Cloud”? In the HP Cloud Console Area you can manage … Read more

Install Red5 on Google Compute Engine

Yesterday we have installed basic web server (apache, php, mysql) on Google Compute Engine. Today our target is to install Red5 on Ubuntu server for Google Compute Engine. First we need to check Java version installed on Google Compute Engine $ java -version The program ‘javac’ can be found in the following packages: * default-jdk … Read more

Install Apache, PHP, MySQL on Google Compute Engine

I am so happy to get access for Google Compute Engine Limited Preview 🙂 Google Compute is a service that provides virtual machines on Google infrastructure. Google Compute (virtual machines with distributed computing power) provides some options that enable to configure, deploy, and manage multiple virtual machines in multiple data centers. – Command-line tool called … Read more