Auto-join Google Hangout when entering its URL & presses "I am not sleeping" time to time.This script is for you if you want to set up an always-on camera+monitor in your office to keep in touch with your colleagues when your are out of the office.
Features:
1. Auto-joins a Google Hangout session when somebody refreshes the page by accident.
2. Automatically presses “I am not sleeping” time to time.
3. Allows you to have a permanent URL for your hangout, even if it is reloaded and its link is changed.
ATTENTION: requires English Google Hangout localization! Does not work for any other language except English. To turn on English, you should: 1) specify English as a default language in your Google account, 2) specify English as a first-priority language in your browser (for Chrome: Menu – Settings – Show advanced settings… – Languages, move English list item at the 1st place).
If you want to make a constant link for your hangout (bound to your browser), even after the hangout is reloaded and its Google link is changed, you may place the following PHP script somewhere to your web-server (e.g. to /google_hangout_keep_online.php) and specify its URL with “Change permalink” button. This script is a simple URL shortener which also allows to modify existed short URLs to keep them permanent.
<?php
// Program entry point.
function main()
{
ini_set('html_errors', false);
ini_set('display_errors', true);
$file = session_save_path() . "/google_hangout_keep_online.csv";
$f = @fopen($file, "a+");
if (!$f) {
throw new Exception("Cannot open $file for writing: " . last_error());
}
$f = @fopen($file, "r+");
if (!$f) {
throw new Exception("Cannot open $file for reading and writing: " . last_error());
}
flock($f, LOCK_EX);