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
<!-- http://www.apphp.com/index.php?page=html_snippets --> | |
<!-- Grab Google CDN's jQuery and load local version if necessary --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript">!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script> |
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
<style type="text/css"> | |
/* source: http://www.apphp.com/index.php?snippet=css-center-site-content */ | |
/* Center your website horizontally */ | |
.wrapper{ | |
width:960px; | |
display:table; | |
margin:auto; | |
} | |
/* Center certain content vertically */ |
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 | |
/* Source: http://www.apphp.com/index.php?snippet=php-get-remote-ip-address */ | |
function getRemoteIPAddress(){ | |
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; | |
return $ip; | |
} | |
/* If your visitor comes from proxy server you have use another function | |
to get a real IP address: */ |