⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsockopen.php3

📁 linux操作系统中 php 核心编程所有例程 都是一些很不错的案例
💻 PHP3
字号:
<?
	// tell browser not to render this
	header("Content-type: text/plain");

	// try to connect to Web server
	$connection = fsockopen("www.clearink.com", 
		80, &$error_number, &$error_description);

	if($connection)
	{
		// set non-blocking mode
		set_socket_blocking($connection, false);

		// set how long to wait
		set_socket_timeout($connection, 60);

		// tell server we want root document
		fputs($connection, "GET / HTTP/1.0");
		fputs($connection, "\r\n\r\n");

		// get the output
		fpassthru($connection);
		fclose($connection);
	}
	else
	{
		// $connect was false
		print("An error occurred!<BR>\n");
		print("Number: $error_number<BR>\n");
		print("Description: $error_description<BR>\n");
	}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -