This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Find the code you see below... (starting at line 18) | |
$mail_headers = 'From: [email protected]'; | |
$mail_headers = 'Reply-To: [email protected]'; | |
// Change it to this: | |
$mail_headers = 'From: [email protected]' . "\r\n"; | |
$mail_headers .= 'Reply-To: [email protected]' . "\r\n"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// filtering | |
$data = array(); | |
$data['name'] = itsy_filter::text($this->_request->post('name')); | |
$data['age'] = itsy_filter::digit($this->_request->post('age')); | |
$data['address_line_1'] = itsy_filter::text($this->_request->post('address_line_1')); | |
$data->name = itsy_filter::text($this->_request->post('name')); | |
$data->age = itsy_filter::digit($this->_request->post('age')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// setup our session. | |
ini_set('session.use_only_cookies', true); | |
session_name('secret_number_game'); | |
session_start(); | |
// set the secret number; once! | |
function secret_number() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// more error details please. | |
error_reporting(E_ALL|E_STRICT); | |
ini_set('display_errors', true); | |
//setup session | |
ini_set('session.use_only_cookies', true); | |
session_name('easy_maths_game'); | |
session_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class itsy_helper | |
{ | |
public static function link_to($name = 'Link Name', $action = 'index', $controller = 'default') | |
{ | |
if ($action == 'index') { | |
return sprintf('<a href="/?c=%s">%s</a>', $controller, $name); | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set our attributes and values | |
$input_array = array( | |
'name' => 'luke', | |
'age' => 23, | |
'occupation' => 'developer' | |
); | |
$input_object = (object) $input_array; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toggle_hidden_content(id) | |
{ | |
if (document.getElementById(id)) { | |
if (document.getElementById(id+'_show').style.display != 'none') { | |
document.getElementById(id+'_show').style.display = 'none'; | |
document.getElementById(id).style.display = 'block'; | |
} | |
else { | |
document.getElementById(id+'_show').style.display = 'inline'; | |
document.getElementById(id).style.display = 'none'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last login: Mon Dec 22 09:41:09 2008 from macpro.lcegr.lividpenguin.com | |
Linux 2.6.27.7-smp. | |
'Twas the Night before Crisis | |
'Twas the night before crisis, and all through the house, | |
Not a program was working not even a browse. | |
The programmers were wrung out too mindless to care, | |
Knowing chances of cutover hadn't a prayer. | |
The users were nestled all snug in their beds, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'net/https' | |
require 'hpricot' | |
# Luke Antins - http://lividpenguin.com/ | |
# very quick scrap script to build dns zone files from 123-reg data. | |
# used for migrating from 123-reg's dns servers. | |
def scrape_for_dns_records(domain_name) | |
http = Net::HTTP.new('www.123-reg.co.uk', 443) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Database: `timelapse` | |
-- | |
-- Table structure for table `people` | |
-- | |
CREATE TABLE IF NOT EXISTS `people` ( | |
`id` int(11) NOT NULL auto_increment, | |
`name` varchar(255) NOT NULL, | |
PRIMARY KEY (`id`) |
OlderNewer