I have the following environment.
Windows 2000 Pro, running IIS5.1 with PHP 4.3.2. Runs fine. The machine has a static ip, (192.168.0.2). This is connected to another Windows 2000 box, which is connected to the Internet, and acts as the proxy for all Net access, it runs the firewall, etc. it has the IP address 192.168.0.1
Whilst PHP functions fine, for general DB access, and page display, any attempt at using PHP functions to connect to external web sites, fails.
eg the following snippet:
<?php
$file_name = 'sample_data.html';
$root_url = "http://www.php.net/";
$page_data= join ('', file($root_url));
$handle = fopen($file_name, 'w+');
fwrite($handle, $page_data);
fclose($handle);
print "<br/>Done..<br/>";
?>
Results in an error of the following type:
Warning: file(): php_hostconnect: connect failed in C:\projects\local_web\scripts\get_page.php on line 7
Is there a php setting that can allow access to external web sites via the proxy?
Any other suggestions if this is not possible?
Cheers
Onkar