Errata amendments
This commit is contained in:
@@ -7,6 +7,6 @@
|
||||
function mysql_fix_string($pdo, $string)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) $string = stripslashes($string);
|
||||
return $pdo->real_escape_string($string);
|
||||
return $pdo->quote($string);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<form method="post" action="calc.php"><pre>
|
||||
Loan Amount <input type="text" name="principal">
|
||||
Monthly Repayment <input type="text" name="monthly">
|
||||
Number of Years <input type="text" name="years" value="15">
|
||||
Interest Rate <input type="text" name="interest" value="3">
|
||||
<input type="submit">
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<script>
|
||||
function asyncRequest()
|
||||
{
|
||||
try // Non IE Browser?
|
||||
{ // Yes
|
||||
var request = new XMLHttpRequest()
|
||||
}
|
||||
catch(e1)
|
||||
{
|
||||
try // IE 6+?
|
||||
{ // Yes
|
||||
request = new ActiveXObject("Msxml2.XMLHTTP")
|
||||
}
|
||||
catch(e2)
|
||||
{
|
||||
try // IE 5?
|
||||
{ // Yes
|
||||
request = new ActiveXObject("Microsoft.XMLHTTP")
|
||||
}
|
||||
catch(e3) // There is no asynchronous support
|
||||
{
|
||||
request = false
|
||||
}
|
||||
}
|
||||
}
|
||||
return request
|
||||
}
|
||||
</script>
|
||||
@@ -3,7 +3,6 @@
|
||||
{
|
||||
echo file_get_contents('http://' . SanitizeString($_POST['url']));
|
||||
}
|
||||
|
||||
function SanitizeString($var)
|
||||
{
|
||||
$var = strip_tags($var);
|
||||
@@ -11,8 +11,7 @@
|
||||
let nocache = "&nocache=" + Math.random() * 1000000
|
||||
let XHR = new XMLHttpRequest()
|
||||
|
||||
XHR.open("POST", "http://127.0.0.1/18/urlget.php?url=news.com" + nocache, true)
|
||||
XHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
|
||||
XHR.open("GET", "http://127.0.0.1/18/urlget.php?url=news.com" + nocache, true)
|
||||
XHR.send()
|
||||
|
||||
XHR.onreadystatechange = function()
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php // xmlget.php
|
||||
<?php
|
||||
if (isset($_GET['url']))
|
||||
{
|
||||
header('Content-Type: text/xml');
|
||||
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php // urlget.php
|
||||
<?php
|
||||
if (isset($_GET['url']))
|
||||
{
|
||||
header('Content-Type: text/xml');
|
||||
echo file_get_contents("http://".sanitizeString($_GET['url']));
|
||||
}
|
||||
|
||||
function sanitizeString($var)
|
||||
{
|
||||
$var = strip_tags($var);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<title>RSS Feed</title>
|
||||
<link>http://website.com</link>
|
||||
<description>website.com's RSS Feed</description>
|
||||
<pubDate>Mon, 11 May 2020 00:00:00 GMT</pubDate>
|
||||
<pubDate>Mon, 10 May 2027 00:00:00 GMT</pubDate>
|
||||
<item>
|
||||
<title>Headline</title>
|
||||
<guid>http://website.com/headline</guid>
|
||||
@@ -8,8 +8,6 @@
|
||||
background:linear-gradient(top, #fb0, #f50);
|
||||
background:-moz-linear-gradient(top, #fb0, #f50);
|
||||
background:-webkit-linear-gradient(top, #fb0, #f50);
|
||||
background:-o-linear-gradient(top, #fb0, #f50);
|
||||
background:-ms-linear-gradient(top, #fb0, #f50); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user