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
class Curl | |
{ | |
/** | |
* A get request to another site. | |
* | |
* Ex: Curl::get('http://google.com/') will return the standard curl response from google | |
* | |
* @param string The url of the site | |
* @param string The response language (currently json or xml, they will be automatically parsed) | |
* @param array Any custom curl options that need to be added in the form of array(OPTION => 'value'); |
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 | |
//Lets say the itema are stored in the $items variable | |
//$items[0]['Product Image'] is "product1.jpg" (that's what you would put in the database/the picture of the first item) | |
//Then you'd do | |
foreach($items as $item) | |
{ ?> | |
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 | |
//Starting values (one way to do an array) | |
$peopleWhoHateChris = array('Jacob'); | |
//Adding to the array | |
$peopleWhoHateChris[] = 'John'; | |
$peopleWhoHateChris[] = 'Mike'; | |
//Another way to add |
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 | |
$peopleWhoHateChris=array('Jacob','John','Mike','Luke'); | |
$countHateChris=count($peopleWhoHateChris); | |
echo "$countHateChris people think Chris is a fucking retard."; | |
print $peopleWhoHateChris[2]; | |
unset($peopleWhoHateChris[2]); | |
foreach($peopleWhoHateChris as $name){ |
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
'classes' = [ | |
{ | |
'learning_context' [int] - the learning context id of the Dredbeard page , | |
'sis' [string] - the SIS canvas course id | |
'special_instructions' [string/optional] - any special instructions to add to the request, | |
} | |
] |
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 | |
// This class defines what a dog is | |
class Dog { | |
// What runs when you make a "new Dog()" | |
function __construct($breed, $size) { | |
// Doing $this->whatever = $whatever assigns whatever's | |
// in the parenthesis to THAT particular dog | |
// that's being defined. | |
$this->breed = $breed; |
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 | |
function __autoload($class_name) | |
{ | |
$fileName = ''; | |
if(strpos($class_name, "\\") === false) { | |
$fileName = '/corename/app/classes' . DIRECTORY_SEPARATOR; | |
} | |
$className = ltrim($class_name, '\\'); |
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 | |
namesapce Baughss\Core; | |
class Router { | |
} |
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
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> | |
<p>Could you fucking not?</p> |
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
console.log(document.domain); | |
console.log('Attacked with XSS!'); |
OlderNewer