Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /** | |
| * loadJSONP( url, hollaback [, context] ) -> Null | |
| * - url (String): URL to data resource. | |
| * - hollaback (Function): Function to call when data is successfully loaded, | |
| * it receives one argument: the data. | |
| * - context (Object): Context to invoke the hollaback function in. | |
| * | |
| * Load external data through a JSONP interface. | |
| * | |
| * ### Examples |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /** | |
| * Check if a given ip is in a network | |
| * @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
| * @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
| * @return boolean true if the ip is in this range / false if not. | |
| */ | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } |