Go through this amazon link http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
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
<!-- Specifying multiple formats --> | |
<input type="file" accept=".csv, .txt" /> | |
<!-- For CSV --> | |
<input type="file" accept=".csv" /> | |
<!-- For Excel 97-2003 --> | |
<input type="file" accept="application/vnd.ms-excel" /> | |
<!-- For Excel 2007+ --> |
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 | |
$html = gzdecode(file_get_contents('http://kat.ph')); | |
preg_match_all('/https?\:\/\/[^\" ]+/i', $html, $links); | |
var_dump($links); |
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
HashMap<String, HashMap> selects = new HashMap<String, HashMap>(); | |
for(Entry<String, HashMap> entry : selects.entrySet()) { | |
String key = entry.getKey(); | |
HashMap value = entry.getValue(); | |
} |
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 | |
if(isset($_FILES["file"])) | |
{ | |
$ext_allowed = array("jpg","png"); // add allowed extensions here | |
$dir = "uploads"; // Add Directory for uploads here | |
$name = $_FILES['file']['name']; | |
$tmp = $_FILES['file']['tmp_name']; | |
$ext = strtolower(pathinfo($name, PATHINFO_EXTENSION)); | |
$newname = substr(md5(rand(1231,483798489)),0,6)."_".strtotime(date('Y-m-d H:i:s')); |
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 | |
/** | |
* The function convert an input string to a date with desired format. | |
* @param string $date | |
* @param string $format | |
* @return datetime | |
*/ | |
function customDate($date,$format) | |
{ | |
if($date=="" || $date=="0000-00-00 00:00:00") |
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 | |
/** | |
* FTP upload lets you upload files to the server via FTP | |
* @param string $host -host name of the server goes here | |
* @param string $ftp_user -FTP username | |
* @param string $ftp_pwd -FTP password | |
* @param string $filename -filename to save with | |
* @param string $content -content of the file | |
* @return boolean | |
*/ |
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 | |
/** | |
* a function for sending sms using curl. | |
* @param integer $to -must be a valid 10 digit mobile number | |
* @param string $msg -must be valid message. | |
* @return string | |
*/ | |
function sendSms($to,$msg) | |
{ | |
$username = ""; // The username of SENDER. |
NewerOlder