Skip to content

Instantly share code, notes, and snippets.

View pmoust's full-sized avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
@pmoust
pmoust / httpget
Last active December 27, 2015 09:29 — forked from DaSourcerer/httpget
#!/usr/bin/php
<?php
$scheme='tcp';
$host='www.kernel.org';
$port=80;
$path='/';
if(isset($argv[1])) {
$parsedUrl=parse_url($argv[1]);
<?php
/**
* Returns the active language.
* @return string the locale.
*/
public function resolveActiveLanguage()
{
$user = user();
$matches = array();
if ($user->hasState('__locale')) {