Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/xampp/install/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/xampp/install/portcheck.php
<?php
	$host = "127.0.0.1";
	$timeout = 1;
	$i = 1;

	$curdir = getcwd();
	$curdir = getcwd();
	list($partition, $nonpartition) = preg_split ("/:/", $curdir); //Fix by Wiedmann
	$partwampp = substr(realpath(__FILE__), 0, strrpos(dirname(realpath(__FILE__)), '\\'));
	
	$portchecklog = $partwampp."\install\\portcheck.ini";

	$port = ereg_replace('-', '', $argv[1]);
	$werte = substr_count($port, ',');
	$ports = explode(',', $port);
	$anzahl = count($ports);
	$datei = fopen($portchecklog, 'w+');
	fputs($datei, "[Ports]\r\n");
	while ($i <= $anzahl) {
		$a = $i - 1;

		settype($ports[$a], "integer");
		if (($handle = @fsockopen($host, $ports[$a], $errno, $errstr, $timeout)) == false) {
			$print = "Port".$ports[$a]."=FREE\r\n";
		} else {
			$print = "Port".$ports[$a]."=BLOCKED\r\n";
		}
		fputs($datei, $print);
		@fclose($handle);
		$i++;
	}
	fclose($datei);
	exit;
?>