html php code problem

crimp

Beta member
Messages
5
Hi i'm trying to run a program on my server (nmap) and i want it to display the infomation on a web page. I have php installed, do i need something else.
This is what i have copyed

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Your information</title>
<link rel="stylesheet" title="Default style" type="text/css" href="base.css" />
<style type="text/css">
pre {
border: solid thin black;
}
</style>
</head>
<body>
<?php flush();
$ip = getenv("REMOTE_ADDR");
?>
<?$nmap = shell_exec("nmap -O 127.0.0.1"); ?>
<pre>
<?php print($nmap);?>
</pre></dd>
</body>
</html>


This only displays a rectangle box becasue of the <pre> but it doesn't display the nmap data.
Thank you
 
Back
Top Bottom