heres how you redirect unsecure web traffic to a secure protocal using curl and refresh code for php

View previous topic View next topic Go down

heres how you redirect unsecure web traffic to a secure protocal using curl and refresh code for php

Post by jamied_uk on 11th December 2013, 04:25

Code:
<title>J~Net</title>
<body style="background:#000000">
<font color="red" font size="+1">

<?php
function curPageURL() {
 $pageURL = '';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
return $pageURL;
}
?>
<center>
<?php
$url = curPageURL();
?>
<p><br><p><br>
<a href="https://<?php echo $url;?>">Please Use Secure J~Net Site https://<?php echo $url;?></a>
<META http-equiv="refresh" content="6;URL=https://<?php echo $url;?>">
avatar
jamied_uk
Admin

Posts : 2155
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum