kat35601 Posted February 27, 2019 Share Posted February 27, 2019 Why is double spacing the results I know it's stupid simple but I can't see it. I removed $host ip so if you test put one in there. <!doctype html> <html lang="en"> <html> <body> <?php ini_set('max_execution_time', 0); ini_set('memory_limit', -1); $host = "insert IP"; $ports = array(21 ,22 ,23 ,25, 80, 81, 110, 143, 443, 587, 2525, 3306); foreach ($ports as $port) { $connection = @fsockopen($host, $port, $errno, $errstr, 2); if (is_resource($connection)) { echo '<p>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</p>'; fclose($connection); } else { echo '<p>' . $host . ':' . $port . ' is not Open.</p>'; } } ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted February 27, 2019 Share Posted February 27, 2019 When you say double spacing, do you mean there's extra space between each line. So it goes host:port... host:port... etc. If so, it's because each line is surrounded with a paragraph tag. By default, browsers add space between paragraphs. You could use CSS to adjust the spacing...or you could switch to the break or list tag. Quote Link to comment Share on other sites More sharing options...
kat35601 Posted February 27, 2019 Author Share Posted February 27, 2019 That's it spacing between the the <p> tags thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.