PHPverse 2025

Voting

: min(five, three)?
(Example: nine)

The Note You're Voting On

Sherif Gayed
22 years ago
Here is how to connect to the web from behind a proxy server:

<?php
/*************start code**************/
/*your proxy server address*/
$proxy = "192.168.10.1";
/*your proxy server port*/
$port = 8080;
/*the url you want to connect to*/
$url = "http://www.php.net/";
$fp = fsockopen($proxy, $port);
fputs($fp, "GET $url HTTP/1.0\r\nHost: $proxy\r\n\r\n");
while(!
feof($fp)){
$line = fgets($fp, 4000);
print(
$line);
}
fclose($fp);
/**************end code**************/
?>

<< Back to user notes page

To Top