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 createQR($url,$size ='150',$evLevel='L',$margin='0') { | |
$url = urlencode($url); | |
return '<img src="http://chart.apis.google.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chld=' . $evLevel . '|' . $margin . '&chl=' . $url . '" alt="QR code" width="' . $size . '" height="' . $size . '"/>'; | |
} | |
echo createQR('http://www.wickedbrilliant.com',150); |
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
Day: <input type="text" name="day" id="day" value ="5" /> | |
<hr> | |
Month: <input type="text" name="month" id="month" value ="12" /> | |
<hr> | |
Year: <input type="text" name="year" id="year" value ="1972" /> | |
<hr> | |
Birthday: <span id="birthday">?</span> | |
<hr> | |
Today: <span id="todayIs">?</span> | |
<hr> |
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 percentChange($oldNos = 0, $newNos = 0) { | |
$scratchSheet = ($newNos + 0) - ($oldNos + 0); | |
return round((($scratchSheet / $oldNos) * 100),2); | |
} | |
?> |
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 | |
$headers = apache_request_headers(); | |
foreach ($headers as $header => $value) { | |
echo "$header: $value <br />\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 | |
require('facebook.php'); | |
$facebook = new Facebook(array( | |
'appId' => 'YOUR_APP_ID', | |
'secret' => 'YOUR_APP_SECRET', | |
)); | |
$cokeFans = $facebook->api('/cocacola'); |
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 | |
$facebook = new Facebook(array( | |
'appId' => 'YOUR_API_KEY', | |
'secret' => 'YOUR_API_SECRET', | |
'cookie' => true, | |
)); | |
$fql = "SELECT page_id, name from page where name='Coke'"; |
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
# Download and install xCode to install make. | |
# http://itunes.apple.com/us/app/xcode/id448457090?mt=12 | |
# Don't forget to run "/Applications/Install Xcode.app" | |
# Open up your terminal, and follow the steps below | |
# by cutting pasting or typing the below in. | |
# The number sign indicates a comment. | |
# Make a temporary directory | |
mkdir temp |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
######################################## | |
# Adjust Memory/Post/Execution/ Upload Size | |
######################################## | |
php_value max_execution_time 3600 | |
php_value upload_max_filesize 100M | |
php_value post_max_size 220M | |
php_value memory_limit 256M | |
######################################## | |
# Display Errors: (Comment out for no Errors) |
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("postmark.php"); | |
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address"); | |
$result = $postmark->to("[email protected]") | |
->subject("Email Subject") | |
->plain_message("This is a plain text message.") | |
->attachment('File.pdf', $file_as_string, 'application/pdf') |
OlderNewer