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
<style> | |
/* | |
The .unit class indicates a single page item (e.g. a latest news list). Units cannot be nested. | |
The .group class indicates a collection of units. | |
*/ | |
.unit:before, .unit:after, .group:before, .group:after { content: "\0020"; display: block; height: 0; overflow: hidden; } | |
.unit:after, .group:after { clear: both; } | |
.unit, .group { zoom: 1; } |
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
<script src="https://github.com/ImDom/BeaconPush-PHP/blob/master/jquery.beaconpush.js"></script> | |
<script> | |
Beacon.connect('AAAAAAA', ['channelname'], {log:false}); | |
$.BeaconPush.addEventListener('update', function(event) { | |
setData( event.data ); | |
}); | |
</script> |
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 | |
/** | |
* Database class | |
* | |
* @author Mark James | |
* @package | |
*/ | |
/** |
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
In /etc/hosts: | |
127.0.0.1 test.site | |
In your httpd.conf: | |
NameVirtualHost * | |
<VirtualHost *> | |
ServerName test.site |
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 | |
// Demo for session fixation | |
// | |
// Attacker creates a session by visiting the page: http://famfamfam.com/sessionfixation.php | |
// Attacker gets their session ID out of the cookie (or in this case from the page) | |
// Attacker creates a URL such as http://famfamfam.com/sessionfixation.php?PHPSESSID=attackerssessionid and sends it to victim | |
// Victim clicks the URL (now both the attacker and victim are using the same session) | |
// Victim logs in | |
// Now the attacker is logged in to the victim's account too (same session!) |
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 | |
ob_start(); | |
$out = fopen('php://output', 'w'); | |
$headerRow = array(); | |
foreach( array_keys($result[0]) as $fieldname ) { | |
$headerRow []= isset($fields[$fieldname]) ? $fields[$fieldname]['title'] : $fieldname; | |
} | |
fputcsv($out, $headerRow ); | |
foreach( $result as $row ) { |
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 | |
require( 'persistent.class.php' ); | |
class Episode extends Persistent { | |
public $series; | |
public $season; | |
public $number; | |
public $airdate; |
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
/* @group Clearfix */ | |
{YOUR SELECTOR}:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} /* Clearfix */ | |
* html {YOUR SELECTOR} { zoom: 1; display: block; } /* Clearfix - IE6 */ |
NewerOlder