added http proxy support

This commit is contained in:
skeeter 2000-08-26 01:05:04 +00:00
parent 5e3e861e79
commit cc556d86c3

View File

@ -31,13 +31,12 @@
if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) { if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) {
$fp = fsockopen("phpgroupware.org",80,&$errono,&$errstr,30); $phpgw->network->set_addcrlf(False);
fputs($fp,"GET /currentversion HTTP/1.0\nHOST: www.phpgroupware.org\n\n"); if ($phpgw->network->open_port("phpgroupware.org",80,30)) {
if ($fp) { $phpgw->network->write_port("GET /currentversion HTTP/1.0\nHOST: www.phpgroupware.org\n\n");
while ($line = fgets($fp,4096)) { while ($line = $phpgw->network->read_port())
$lines[] = $line; $lines[] = $line;
} $phpgw->network->close_port();
fclose($fp);
} }
for ($i=0; $i<count($lines); $i++) { for ($i=0; $i<count($lines); $i++) {