This file contains hidden or 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 | |
// http://prajapatinilesh.wordpress.com/2009/01/14/manually-set-php-session-timeout-php-session/ | |
// Change the session timeout value to 30 minutes // 8*60*60 = 8 hours | |
//ini_set('session.gc_maxlifetime', 30*60); | |
//// php.ini setting required for session timeout. | |
// | |
//ini_set('session.gc_maxlifetime',30); | |
//ini_set('session.gc_probability',1); | |
//ini_set('session.gc_divisor',1); |
This file contains hidden or 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 | |
/** | |
* User: videde | |
* Date: 8/21/13 | |
* Time: 1:37 AM | |
*/ | |
set_include_path(dirname(__FILE__).'/Classes/'); | |
include 'PHPExcel/IOFactory.php'; | |
function action() { |
This file contains hidden or 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 | |
/** | |
* User: videde | |
* Date: 8/21/13 | |
* Time: 1:41 AM | |
*/ | |
require('phpQuery/phpQuery.php'); | |
function action() { | |
$content = ""; // content of web page | |
$doc = phpQuery::newDocument($content); |
This file contains hidden or 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 | |
/** | |
* Author: videde | |
* Date: 9/13/13 | |
* Time: 2:26 AM | |
*/ | |
require('Pusher.php'); | |
$app_id = ''; | |
$app_key = ''; | |
$app_secret = ''; |
This file contains hidden or 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 | |
/** | |
* Author: videde | |
* Date: 8/21/13 | |
* Time: 12:46 AM | |
*/ | |
require_once 'random-user-agent.php'; | |
class Url { | |
/* | |
* use proxy: |
This file contains hidden or 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 | |
try { | |
$conn = odbc_connect( | |
"DRIVER={SQL Server};Server=tcp:ac1wr559wv.database.windows.net,1433;Database=1407_test", | |
"project", "Plastic48"); | |
$cur = odbc_exec($conn, "select username, password, address from users"); | |
while (odbc_fetch_row($cur)) { | |
//collect results |
This file contains hidden or 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 getCloud( $data = array(), $minFontSize = 12, $maxFontSize = 30 ) | |
{ | |
$minimumCount = min($data); | |
$maximumCount = max($data); | |
$spread = $maximumCount - $minimumCount; | |
$cloudHTML = ''; | |
$cloudTags = array(); | |
$spread == 0 && $spread = 1; | |
This file contains hidden or 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 | |
// $imageDirectory = the directory of the image with out the trailing slash | |
// $thumbDirectory = the directory where you want to save the thumb | |
// $imageName = the file name of the image example: myimage.gif | |
// $thumbWidth = the final size of the thumb | |
// $percent = the scaling size of the image. values = .1 - 1 | |
// This function will Save the image on your server | |
function transparentGif($imageDirectory,$thumbDirectory, $imageName, $thumbWidth){ | |
$image = imagecreatefromgif("$imageDirectory/$imageName"); |
This file contains hidden or 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 encodeimg($file) { | |
$contents = file_get_contents($file); | |
$base64 = base64_encode($contents); | |
$imagetype = exif_imagetype($file); | |
$mime = image_type_to_mime_type($imagetype); | |
return "data:$mime;base64,$base64"; | |
} | |
?> |