Wednesday, 26 February 2014

how to get Video Chat in my website

Magnoliyan Video Chat (mgVideoChat) is full featured video communication system with integrated text chat, available directly within your web browser. You can consider it as online web based Skype, but without the requirement to install any additional software, plugin nor flash.
There is unlimited number of use cases: online live video chat support, private rooms, community chat rooms…
Unlike some other systems, Magnoliyan Video Chat includes full featured server side “signaling” engine: you can see who is online, click to call, click to end call, send text messages. You can even mark certain users as operators who are able to receive calls, while all others can just make calls – perfect for tech support.
In order to disallow anonymous users, there is special plugin system for authorization of visitors. You can easily customize it with your own web app login mechanism. Still, Magnoliyan Video Chat comes with built in support for facebook login and wordpress accounts. It’s even possible to use different authorization system per chat room.

Video Chat - CodeCanyon Item for SaleFeatures

  • Pure HTML 5 RTC video chat system
  • PHP server side signaling system included
  • No additional software nor accounts needed
  • No DB needed
  • Mobile friendly responsive interface
  • Facebook authorization support
  • Wordpress authorization suppor
  • Extendable authorization system
  • Created with Bootstrap 3
  • Ability to define chat rooms
  • Ability to define callable operators

How to Generate Dynamic Favicon in PHP

please read about that Gmail has just launched small but really useful feature in Gmail Labs. Dynamic Favicon showing unread email counts directly in your browser tab icon. If your browser window has lots and lots of tabs open at anytime, this might be really a wonderful feature that lets user know of any unread item. Here is a small and powerful script in PHP that lets you create your own Dynamic favicon. We will use PHP GD library to manipulate the favicon image and add text into it. Below is the simple script that reads a favicon image add add some text character on it.
2//Read the favicon template from favicon.png
3//file from current directory
4$im = imagecreatefrompng("favicon.png");
5//$im = imagecreatefromjpg("favicon.jpg");   //using this function to load favicon of jpeg type
6//$im = imagecreatefrombmp("favicon.bmp"); //using this function to load favicon of bmp type
8/* Read the character which needs to be added in favicon from
9 * get request
10 */
11if(isset($_GET['char']) && !empty($_GET['char'])) {
12    $string = $_GET['char'];
13} else {
14    /* If no character is specified; add some default value */
15    $string = 'V';
18/* background color for the favicon */
19$bg = imagecolorallocate($im, 255, 255, 255);
21/* foreground (font) color for the favicon */
22$black = imagecolorallocate($im, 0, 0, 0);
24/* Write the character in favicon
25 * arguements: image, fontsize, x-coordinate,
26 *              y-coordinate, characterstring, color
27 */
28imagechar($im, 2, 5, 1, $string, $black);
30header('Content-type: image/png');
The above code is pretty much self explanatory. We read a character from GET request and add it into the favicon image. Note here that we are using a template favicon image which me modify. You can place any favicon of your choice near favicon.php file.

create a mobile app in php

How to start?

Development of a complex iPFaces application is really simple because the simulation mode can be used. This mode is capable of transfering XML content to a HTML page, which can be displayed in a web browser. It is a helpful tool for developers who can see their iPFaces application in the browser window and they do not need a real iPhone device for main development.
Developers can build and deploy an application to the application server and the browser will show them the GUI which is almost the same as a screen in an iPhone application. There is a difference in the GPS elements. A GPS field is working in a browser only as text field that can be filled by user and GPS coordinates will be submitted. The GPS field is hidden on mobile devices, because the location of the device is detected without interaction with the user.

Hello world example

To use PHP iPFaces library, just include “ipfaces-php-lib-1.1.php” file, construct the component tree and call “render()” method on the component form.
   require "path/to/ipfaces/library/ipfaces-php-1.1.php";

   $ipf_form = new IPFForm("form1", "Form");
   $ipf_screen = $ipf_form->addScreen("Hello World Application", "screen1");
   $ipf_screen->addLabel("Hello World!");
Hello world app on the iPhone device and in a web browser

Use of location service

To obtain a user location from a mobile device use the IPFGsm class. Upon submission of a form, the location data will be sent as a parameter with the selected name (gpsElement in this example).
      require "../lib/ipfaces-php-lib-1.1.php";

      $form = new IPFForm();

      $screen = $form->addScreen("How Far Is It?");

      $screen->addLabel("You can find distance between your position and selected city.");

      $select = new IPFSelect("countrySelect", "1", "Distance to", "list" );

      $select->addOption("35.17 149.13 Australia Canberra", "Canberra");
      $select->addOption("51.30 0.10 UK London", "London");
      $select->addOption("50.05 14.28 Czech Prague", "Prague");
      $select->addOption("38.53 77.02 USA Washington", "Washington");

      $select->Icon = "../img/distcalc.png";

      $screen->addButton("backButton", "1", "Examples", "../index.php", IPFButton::BUTTON_TYPE_LINK, IPFButton::BUTTON_POSITION_BACK);

      $screen->addButton("submitButton", "0", "Calculate" , "distance.php", IPFButton::BUTTON_TYPE_SUBMIT, IPFButton::BUTTON_POSITION_FORWARD);