Skip to content

Instantly share code, notes, and snippets.

View HARIHARANS1995's full-sized avatar

HARIHARANS HARIHARANS1995

View GitHub Profile
<html>
<head>
<title>CodeClassChat</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="http://codeclasschat.herokuapp.com/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="http://codeclasschat.herokuapp.com/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://codeclasschat.herokuapp.com/helpers.js"></script>
<?php
function lookuppostcode($postcode) {
$postcode = str_replace(" ", "", $postcode);
$key = 'YOUR_API_KEY';
$request = 'https://api.getAddress.io/v2/uk/' . $postcode . '?api-key=' . $key;
$response = file_get_contents($request);
$response = json_decode($response, true);
$returnData = array();
#1: CODE
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
#(last line means visitor is redirected to index with Forbidden message ([F))