Skip to content

Instantly share code, notes, and snippets.

<?php
$content = file_get_contents("http://www.meteochile.cl/js/condicionactualmetar.js?" . time());
$lines = explode("\n", $content);
$lastUpdated = str_replace("var CondicionActualMetar_actualizado = '", "", str_replace(".';", "", $lines[count($lines)-4]));
$data = [];
$data['lastUpdated'] = $lastUpdated;
$data['ciudades'] = [];
@pviojo
pviojo / <domain>.conf
Created June 14, 2012 00:04
Nginx conf. Wordpress blog in a subdirectory (/blog)
server {
listen 80;
server_name <domain>
server_name_in_redirect off;
access_log logs/<domain>.access.log;
error_log logs/<domain>.error.log;
gzip_static on;