PHP Cloud

Introduction to the Zend Developer Cloud

PHPCloud help to Develop, Deploy and Manage PHP Applications in to Any Cloud (Amazon, Rackspace, RightScale, IBM SmartCloud) using Zend Application Fabric.

Demo: http://svnlabs.my.phpcloud.com
Contact: https://www.svnlabs.com/blogs/contact/

PHP for Android

PHP for Android (PFA) project has been launched by Irontec to run PHP on the Android platform. PFA has been launched as an open source project to enable the PHP development on Android. PFA also provides the necessary tools and documentation for the developers. Scripting Layer for Android (SL4A), which was earlier known as Android Scripting Engine (ASE) is used to run PHP on Android.

The PHP4Android APK and the SL4A are available for download at phpforandroid.net.

PHP for Android project (PFA) aims to make PHP development in Android not only possible but also feasible providing tools and documentation.

You need to download APKs:
1. ASE for Android
2. PHP for Android

Getting started

http://code.google.com/p/php-for-android/ (making PHP development in Android possible and feasible.)
http://code.google.com/p/android-scripting/ (Scripting Layer for Android brings scripting languages to Android.)

PHP API Skype4COM

Skype4COM is an ActiveX component that represents the Skype API as objects, properties, commands, events and notifications. Skype4COM is used in ActiveX, Visual Studio, Delphi, PHP or JavaScript.

Download Skype4COM

You might read article on How can we use PHP to access shared library functions?

Useful Links:

Void.Bot is a proof of concept of a Skype bot that sits in Skype Group chats and does useful stuff.

PHP Skype API wrapper class is a PHP class library to access Skype (on Linux) via its API. With PHP DBus, this class library provides easy-to-use interfaces to manipulate Skype on Linux.

<?php
// Create a Skype4COM object:
$skype = new COM("Skype4COM.Skype");

// Create a sink object:
$sink =& new _ISkypeEvents ();
$sink->convert = $skype->convert();

// Connect to the sink:
com_event_sink($skype, $sink, "_ISkypeEvents");

// Create a conversion object:
$convert = $skype->convert;
$convert->language = "en";

// Start the Skype client, minimized and with no splash screen:
if (!$skype->client()->isRunning()) {
  $skype->client()->start(true, true);
}
?>

Skype Tracer is a Windows (.exe) console-based application that lets you issue text-based Skype Desktop API commands to a running Skype client.

COM is an acronym for Component Object Model; it is an object orientated layer defines a common calling convention that enables to call and interoperate with code written in any other language. Not only can the code be written in any language, but it need not even be part of the same executable; the code can be loaded from a DLL, be found in another process running on the same machine.

Skype Developer Forum
http://devforum.skype.com/
http://developer.skype.com/accessories/skype4com
http://community.skype.com/

Fallback for all Browsers & iOS

The JW Embedder currently offers 3 modes:

Flash mode – The original JW Player mode. Uses the Flash Platform to playback streaming and progressive video, images, and sound.
HTML5 mode – HTML5 offers support on the most up-to-date browsers and devices such as the iPhone, iPad, and Android.
Download mode – Download offers the widest range of compatibility, allowing users with almost any video capable device to view the content.

<!DOCTYPE HTML>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8">
<title>Fallback for all Browsers & iOS</title>
</head>

<body>
<script type='text/javascript' src='jwplayer.js'></script>

<divid='mediaplayer'></div>

<!--[if IE]>

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='480' height='270' id='single1' name='single1'>
<param name='movie' value='player.swf'>
<param name='allowfullscreen' value='true'>
<param name='allowscriptaccess' value='always'>
<param name='wmode' value='transparent'>
<param name='flashvars' value='file=video.mp4&image=preview.jpg'>
<embed
id='single3'
name='single3'
src='player.swf'
width='480'
height='270'
bgcolor='#242424'
allowscriptaccess='always'
allowfullscreen='true'
flashvars='file=video.mp4&image=preview.jpg'
/>
</object>

<![endif]-->

<script type="text/javascript">
  jwplayer('mediaplayer').setup({
    'id': 'playerID',
    'width': '480',
    'height': '270',
    /*'provider': 'rtmp',
'streamer': 'rtmp://rtmp.example.com/application',*/    
    'file': 'video.mp4',
    'image': 'preview.jpg',
    'modes': [
        {type: 'flash', src: 'player.swf'},
        {
          type: 'html5',
          config: {
           'file': 'video.mp4',
           'provider': 'video'
          }
        }/*,
{
type: 'download',
src: 'player.swf'
}*/
    ]
  });
</script>
</body>
</html>

Demo: http://demo.svnlabs.com/mediaplayer/fallback.html

Merry Christmas & Happy New Year!

We wish you a Merry Christmas and a Happy New Year.

Merry Christmas everyone Merry Christmas Everyone WordPress Plugin

Merry Christmas Everyone

Christmas is the season for kindling the fire of hospitality in the hall, the genial flame of charity in the heart.

The best of all gifts around any Christmas tree: the presence of a happy family all wrapped up in each other.

May Peace be your gift at Christmas and your blessing all year through!

Merry Christmas everyone Merry Christmas Everyone WordPress Plugin

Send Karaoke Greetings this Christmas using HTML5 Lyrics Karaoke Player

Rackspace Cloud Servers vs Amazon EC2

Rackspace Cloud Servers Amazon EC2
Support Cloud Servers™ is backed by the legendary Fanatical Support you can only get from Rackspace. To receive 24x7x365 support for Amazon EC2, you pay the greater of $400 per month or 10% (scaling down) of your EC2 costs.
Third Party Software Support The Cloud Servers™ with a managed service level option gives our customers support for a number of third party software. Amazon does not provide support for third party software even if customers purchase the highest level of support.
Admin Level Troubleshooting If requested by a Cloud Servers™ with a managed service level customer, Rackspace Cloud support techs will log in to a customer’s Cloud Server to help fix a problem. Amazon Support will not log in to a customer’s EC2 server to help its customers fix a problem.
Persistence One of the most significant differences between Cloud Servers™ and EC2 is the persistence of each virtual server. Cloud Servers™ has access to local, RAID10 disk storage, much like you’d expect in a physical server. Amazon EC2 instances are transient or ephemeral—if there is a host failure that causes your instance to terminate, all local data on that instance will be lost. Data persistence (not server persistence) can be added with Amazon EBS; however, EBS adds additional cost and complexity.
Server Sizes We provide a wide variety of Cloud Server sizes, starting at 256 MB and going up to 30 GB. Cloud Servers™ can be resized to scale without any reinstallation. Amazon EC2 Standard Instances start at 1.7 GB, so if your workload requires fewer resources, you are stuck paying for much more than you need. Amazon recently introduced Micro Instances (starting at 613 MB) for customers needing CPU burst capabilities.
Hybrid Hosting Depending on your needs, you can get the best of both worlds with a combination of cloud and dedicated servers with our RackConnect™ solution. Amazon only offers part of the answer, with only cloud solutions. Amazon VPC is a beta service offering to connect a company’s infrastructure to Amazon’s cloud; however, Amazon does not offer hosting on dedicated/managed servers.
CPU Scheduling Cloud Servers™ has guaranteed minimum CPU power (relative to the size of the Cloud Server), with free bursting when extra capacity is available on the host. Amazon EC2 instances have a capped CPU. If additional CPU capacity is required, you need to launch another instance. Amazon recently introduced Micro Instances which can be added (at an additional cost) for extra CPU resources.
Compute Power A recent study conducted by an independent third party demonstrated that US-based Cloud Servers™ is, on average, more than two times more powerful than comparable Amazon EC2 servers. While the pricing of EC2 instances appears to be lower, if it takes more than twice the time to complete a task, the total price to complete a task increases proportionally.
Disk I/O A recent study conducted by an independent third party demonstrated that on average US-based Cloud Servers™ have a higher disk throughput than comparable Amazon EC2 servers. Amazon has a block storage solution that can show better performance than their built-in ephemeral storage under the right conditions; however, this solution results in additional costs, as both the amount of data stored and transferred are billed for.
IP Addresses Each Cloud Server comes with the simplicity of a dedicated and persistent public IP address (no NAT) with a second, private IP address for free. There is also low latency bandwidth between your Cloud Servers™. Additional public IPs are available upon request and shared IPs can be provided for high availability. With EC2, the IP configuration is more complex. Each instance gets a non-persistent private IP address NATed to a public IP address. When instances terminate and new ones are launched, a new private IP address is assigned which means you need to plan for changing private IPs.
Open Philosophy In 2010, Rackspace became a founding member of OpenStack, an open-source cloud platform designed to foster the emergence of technology standards and cloud interoperability. Amazon has not embraced an open-source approach for cloud interoperability.

 

Source: http://www.rackspace.com/cloud/cloud_hosting_products/servers/compare/

JWPlayer with Ajax

JWPlayer have nice solution to embed any type of media file like PDF, Image, Video, Audio etc.

But you need to embed JWPlayer for Ajax or jQuery Tabs….

You can use below flash code to display JWPlayer with JavaScript events.

JWPlayer with Flash based old embed code

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='470' height='320' id='single1' name='single1'>
<param name='movie' value='player.swf'>
<param name='allowfullscreen' value='true'>
<param name='allowscriptaccess' value='always'>
<param name='wmode' value='transparent'>
<param name='flashvars' value='file=video.mp4&image=preview.jpg'>
<embed
  id='single2'
  name='single2'
  src='player.swf'
  width='470'
  height='320'
  bgcolor='#000000'
  allowscriptaccess='always'
  allowfullscreen='true'
  flashvars='file=video.mp4&image=preview.jpg' />
</object>

Rackspace Cloud Load Balancers vs. Amazon Elastic Load Balancing

Rackspace Cloud Load Balancers Amazon Elastic Load Balancing
Support Chat/phone/ticket support available 24x7x365 To receive 24x7x365 support for Amazon EC2, you pay the greater of $400 per month.
Dedicated Public IP Address A dedicated IP address allows for use as a root record for a zone. When you create an ELB instance, you get a public DNS name; however, it’s not very user friendly and you will want to create a CNAME record in DNS to redirect to your URL.
Access Control List (ACL) Rackspace cloud load balancer has an ACL-based security model. Access control list feature is not available.
Connection Logging Logs are sorted, aggregated, and delivered hourly to Cloud Files™, which is perfect for users who need to perform tuning, inspection, or analysis. Connection logging feature is not available.
Connection Throttling Rackspace cloud load balancers have a connection throttling feature which imposes limits on the number of connections per IP address. Connection throttling feature is not available.
Selectable Algorithms Customize the behavior of your cloud load balancer with selectable algorithms, including: random, round robin, weighted round robin, least connections, and weighted least connections. ELB utilizes only a non-configurable round robin load balancing algorithm.
Advanced HTTP Health Monitoring Rackspace Cloud Load Balancers can use synthetic transaction monitoring to inspect an HTTP response code and body content to ensure the application or site is healthy. While HTTP and TCP-based health monitors are available, ELB does not permit users to define an acceptable status code or body regular expression to match against.
Shared IPs Shared IPs facilitates easier management and better IP utilization of load balancer configuration. ELB does not permit users to share a single IP address across multiple load balancers, but does allow for a single load balancer to support multiple port configurations.
Internal Virtual IPs Internal virtual IPs feature allows you to load balance internal services, without being penalized with external bandwidth charges. All ELBs are configured as public virtual IPs. An internal virtual IP option is not available.
SSL Termination Does not support SSL termination at the load balancer. Supports SSL termination at the load balancer.

 

Source: http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/compare/

Secure Token Plugin with PHP

You might read our old article on how-to-prevent-downloading-and-leeching-media-files

You can review below code to secure your media files to be downloaded other then media players 😉

Creating a Secure Token SWF for JW Player

Secure Token have time limit after that token expire to get media files.

var timestamp = +new Date();

flowplayer("player", "https://www.svnlabs.com/token/player/flowplayer-3.2.7.swf", {
plugins: {
    secure: {
        url: 'player/flowplayer.securestreaming-3.2.3.swf',

        timestamp: timestamp,

        token: '69964920064c0a7626e6c97997070fcd'
    }
},

clip: {
    autoPlay: false,
    autoBuffering: true,
    duration: 30,
    urlResolvers: 'secure',
    baseUrl: 'https://www.svnlabs.com/token/'
}
});
<?php
// Get the file from the server
function get_file(){
global$streamname;
header('Content-Description: File Transfer');
header('Content-type: video/mp4');
header("Content-length: ".filesize($streamname));
header("Expires: 0");
header("Content-Transfer-Encoding: binary");
$file=fopen($streamname,'r');
echostream_get_contents($file);
fclose($file);
exit;
}
// Return secret to flowplayer for use
function get_secret(){
$token='69964920064c0a7626e6c97997070fcd';
return$token;
}
?>

iPad compatible scrollable playlist

We are providing media streaming solution for any device like PC, iPad, iPhone, Android etc.

We are expert in media application servers like Red5, Wowza, Adobe, Union etc.

Review these demo for horizontal & vertical video playlist using flowplayer jQuery plugin 😉

Horizontal scrollable playlist (iPad compatible)

Vertical scrollable playlist (iPad compatible)