curl_exec() getting https://
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /qxq was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
curl_exec() getting http://
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="Roger W. Haworth" />
<title>RHaworth.me default 404 page</title>
</head>
file_get_contents() getting https://
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The smallest possible valid (X)HTML documents ยท Mathias Bynens</title>
<meta name="viewport" content="width=device-width">
<link rel=&
file_get_contents() getting http://
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="Roger W. Haworth" />
<title>RHaworth.me default 404 page</title>
</head>
parse_ini_file()
array (
'urn' => 'sid.ucoz.net',
'usnam' => 'user_name',
'uspas' => 'secret',
)
This server does not allow_url_fopen so highlight_file() is a completely harmless function
Warning: highlight_file(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/rhaworth.net/httpdocs/test/ukcdis.php on line 60
Warning: highlight_file(http://posp.org.uk/book/dopapac.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/rhaworth.net/httpdocs/test/ukcdis.php on line 60
Warning: highlight_file(): Failed opening 'http://posp.org.uk/book/dopapac.php' for highlighting in /var/www/vhosts/rhaworth.net/httpdocs/test/ukcdis.php on line 60
show_source()
<?php
require_once("../../httpdocs/test/ukcdis.php");
?>
highlight_file()
<?php
require_once("../../httpdocs/test/ukcdis.php");
?>
highlight_file() - without the highlighting - using file_get_contents() to display this script
<?php
$titext="Problems with UK Cheapest disabling functions";
/* ------------------------------------------------------------------------------------------------*/
date_default_timezone_set('UTC');
error_reporting(0x7FFF ^ (E_NOTICE | E_STRICT));
ini_set('display_startup_errors',1);
ini_set("display_errors",1);
include('../../httpdocs/incl/http_get.php');
include('../../httpdocs/incl/rwhead5.php');
if (!isset($_REQUEST['api'])) {
rwhhead($titext,FALSE);
?>
<style>
.narr { font: bold 130% sans-serif; margin: 2em 2em 0.7em; color: #077; }
pre, .samp { background: #DDF; }
</style>
</head>
<body>
<?php
}
echo "<div class='narr'>curl_exec() getting https://</div>\n";
echo "<pre>". htmlspecialchars(http_get('https://www.uk-cheapest.co.uk/qxq')) ."</pre>\n";
echo "<div class='narr'>curl_exec() getting http://</div>\n";
echo "<pre>". substr(htmlspecialchars(http_get('http://rhaworth.me/404.htm')),0,530) ."</pre>\n";
echo "<div class='narr'>file_get_contents() getting https://</div>\n";
echo "<pre>". substr(htmlspecialchars(
file_get_contents('https://mathiasbynens.be/notes/minimal-html')),0,299) ."</pre>\n";
echo "<div class='narr'>file_get_contents() getting http://</div>\n";
echo "<pre>". substr(htmlspecialchars(
file_get_contents('http://rhaworth.me/404.htm')),0,530) ."</pre>\n";
echo "<div class='narr'>parse_ini_file() </div>\n";
$ans=parse_ini_file("../../httpdocs/test/sample.ini");
echo "<div class='samp'><pre>\n\n". var_export($ans,true) ."\n\n</pre></div>\n";
$samp_fn="../../httpdocs/test/ukctest.php";
if (!isset($_REQUEST['api'])) {
echo "<div class='narr'>This server does not allow_url_fopen so highlight_file() is a ".
"completely harmless function</div>\n";
# next must be separate echo to get error messages after the heading
echo "<div class='samp'>\n\n". highlight_file("http://posp.org.uk/book/dopapac.php",true) .
"\n\n</div>\n";
}
echo "<div class='narr'>show_source()</div>\n";
echo "<div class='samp'>\n\n". show_source($samp_fn,true) ."\n\n</div>\n";
if (!isset($_REQUEST['api'])) {
echo "<div class='narr'>highlight_file()</div>\n";
echo "<div class='samp'>\n\n". highlight_file($samp_fn,true) ."\n\n</div>\n";
echo "<div class='narr'>highlight_file() - without the highlighting - using ".
"file_get_contents() to display this script</div>\n";
echo "<pre>". htmlspecialchars(@file_get_contents($_SERVER['SCRIPT_FILENAME'])) ."</pre>\n";
?>
<br> <br>
</body>
</html>
<?php
}