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
| To get the facebook profile picture | |
| http://graph.facebook.com/[user id]/picture | |
| For changing the size use this link | |
| http://graph.facebook.com/[user id]/picture?type=large --------------> for larger image | |
| http://graph.facebook.com/[user id]/picture?type=smaller --------------> for smaller image | |
| http://graph.facebook.com/[user id]/picture?type=square --------------> for square |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Add separator in time with Jquery</title> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <script> | |
| $(document).ready(function() { | |
| $("#currentTime").keyup(function(){ | |
| if ($(this).val().length == 2){ |
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
| SELECT * | |
| FROM tbl_name | |
| WHERE creation_time > DATE_SUB(NOW(),INTERVAL 1 HOUR) |
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 | |
| # Check if file exist | |
| if(file_exists("path-to-my-image/my-image.png")){ | |
| print 'File exist'; | |
| } else { | |
| print 'File does not exist'; | |
| } | |
| ?> |
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 | |
| if ($handle = opendir('myFolder')) { | |
| echo "Directory handle: $handle\n"; | |
| echo "Files:\n"; | |
| /* This is the correct way to loop over the directory. */ | |
| while (false !== ($file = readdir($handle))) { | |
| echo $file."<br />"; | |
| } |
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 | |
| $email = "[email protected]"; | |
| if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { | |
| echo "Valid email address."; | |
| } | |
| else { | |
| echo "Invalid email address."; | |
| } |
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
| <? | |
| /* This file is released under the GPL, any version you like | |
| * | |
| * PHP PSD reader class, v1.3 | |
| * | |
| * By Tim de Koning | |
| * | |
| * Kingsquare Information Services, 22 jan 2007 | |
| * | |
| * example use: |
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
| /* | |
| Copyright 2011 Martin Hawksey | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
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 | |
| session_start(); | |
| $_SESSION['count'] = time(); | |
| $image; | |
| ?> | |
| <title>demo.php</title> | |
| <body style="background-color:#ddd; "> | |
| <?php |
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
| <!doctype html> | |
| <html lang="es"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Eliminar archivo con PHP y jQuery Ajax</title> | |
| <!-- Bootstrap--> | |
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
| <!-- jQuery--> |