Re: [PHP] How to download a file (with browser) using fsockopen() ?

2008-02-04 Thread venkatk
Try this, it should work. //Get the file from the remote location function getFile($host, $resource, $port) { ??? $hdr = ''; ??? $file_cont = ''; ??? $fh = fsockopen($host, $port, $errno, $errstr, 300); ??? ??? if(! $fh) ??? { ??? ??? return "error"; ??? } else { ??? ??? $hdr .= "GET /$resour

Re: [PHP] String Issue

2008-01-23 Thread venkatk
Hi, Try this: $str = 'HTMLFiles/MenuDisplay.php?var=Thai%20Image&Item=1797&Action=add'; $str = preg_replace("/(\&Item.*)$/","", $str); this should work. Cheers, V -Original Message- From: Johny Burns <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Thu, 24 Jan 2008 11: