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_time_limit(0); | |
//This is the file where we save the information | |
$fp = fopen (dirname(__FILE__) . '/filename.rar', 'w+'); | |
//Here is the file we are downloading, replace spaces with %20 | |
$ch = curl_init(str_replace(" ","%20", 'http://someserver.crot/filename.rar')); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 50); |
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 | |
// Read more API Documentation @ https://www.flickr.com/services/api/ | |
$xml = simplexml_load_file("https://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&user_id={YOUR USER ID}&per_page=[NUMBER OF PHOTOS TO FETCH]&api_key={REQUIRED!!! YOUR API KEY}&&format=rest"); | |
$output = "<div>"; | |
foreach($xml->children()->children() as $child) { | |
$imgsrc = "http://farm" . $child['farm'] . ".static.flickr.com/" . $child['server']. "/" . $child['id'] . "_" . $child['secret'] . "_s.jpg"; // More about image size suffixes: https://www.flickr.com/services/api/misc.urls.html | |
$fullsize = "http://farm" . $child['farm'] . ".static.flickr.com/" . $child['server']. "/" . $child['id'] . "_" . $child['secret'] . "_o.(jpg|gif|png)"; | |
$output .= "<a href='".$imgsrc."'>"; | |
$output .= "<img src='".$imgsrc."' />"; | |
$output .= "</a>"; |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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 | |
/** | |
* Slideshow shortcode usage: [gallery type="slideshow"] or the older [slideshow] | |
*/ | |
if(!class_exists('zl_add_jetPack_slideshow')){ | |
class zl_add_jetPack_slideshow { | |
public $instance_count = 0; | |
function __construct() { |
NewerOlder