Skip to content

Instantly share code, notes, and snippets.

View csf30816's full-sized avatar

csf30816

  • My House
View GitHub Profile
@csf30816
csf30816 / Simple PHP IP Image
Created June 16, 2017 02:07
Creates a simple PHP IP image
<?php
// Function to get the client IP address
function get_client_ip() {
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_X_FORWARDED']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
javascript: new(function() {
var ext = this;
var recognized_speech = '';
ext.recognize_speech = function(callback) {
var recognition = new webkitSpeechRecognition();
recognition.onresult = function(event) {
if (event.results.length > 0) {
recognized_speech = event.results[0][0].transcript;
if (typeof callback == "function") callback();
}
(function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
(function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
(function(ext) {
ext._shutdown = function() {};
ext._getStatus = function() {
return {
status: 2,
msg: 'Ready to use :)'
}
};
var vars = {
(function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};