heres how you redirect unsecure web traffic to a secure protocal using curl and refresh code for php
Page 1 of 1
heres how you redirect unsecure web traffic to a secure protocal using curl and refresh code for php
- 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;?>">
Similar topics
» Redirect Traffic Linux Web Server
» Force Redirect To Secure Web Using PHP
» Using PHP to auto refresh images
» Curl Internet Speed Test
» Monitor Web Traffic From Linux Bash
» Force Redirect To Secure Web Using PHP
» Using PHP to auto refresh images
» Curl Internet Speed Test
» Monitor Web Traffic From Linux Bash
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum