[PHP] check if an url is valid

2001-04-26 Thread Black Dragon
Hi! can you tell me how can I check if a remote files exists? I've tried with fopen, but I've a warning on STDOUT if file doesn't exists. I wouldn't redirect the STDERR to solve this problem. I could use fsockopen, but I feel that this is a bad solution. Can you tell me something that is easy?

[PHP] playing sounds

2001-05-22 Thread Black Dragon
Hi, can you tell me same library to play sounds from php and output an audio stream to the browser. I'm finding something that build dinamically an swf file (flash) from a template swf and play an mp3 o wav. can you tell me something? I've tried some library, bu unsucessfully -- PHP Gene

[PHP] translating a function from Perl to PHP

2001-04-25 Thread Black Dragon
Hi everyone, I'm a good perl programmer, but I'm not able to translate this small Perl program to PHP: $testo = 'Hi <%NOME%>, how are you? Tomorrow I\'ll go to <%DESTINAZIONE%> with <%AMICO%>!'; %mioArray=( 'NOME' => 'Pippo', 'AMICO' => 'Pluto', 'DESTINAZIONE' => 'Roma'); print $testo

Re: [PHP] translating a function from Perl to PHP

2001-04-25 Thread Black Dragon
You've been my salvation!! thanks! :) > print preg_replace('/<%([a-zA-Z]*)%>/e', "\$mioArray['$1']", $testo); > > i never could understand why other languages > made regular expressions so convoluted. > why not just support the =~ binding operator > instead of that awful function syntax...? >

[PHP] setting the name of the file in Save As windows

2001-04-26 Thread Black Dragon
Hi! I've done a program that send a zip file to browser. I read it on server using fopen because I've it in a private area (I can't send it directly). Now I send it to browser in this way: header ("Content-type: application/x-zip-compressed"); $fd = fopen ($filename, "r"); $data = fread( $

[PHP] (SOLVED)Re: [PHP] setting the name of the file in Save As windows

2001-04-26 Thread Black Dragon
> I've tried unsuccesfully to print this header after the first header: > > header ("Content-Disposition: attachment; filename=\"WorkPlease.zip\""); > It works using: header("Content-Disposition: filename=\"WorkPlease.zip\""); I think my browser is a bit mad :) the rrf http://www.w3.org/Prot

Re: [PHP] check if an url is valid

2001-04-27 Thread Black Dragon
or this job. > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > PHPBeginner.com (Where PHP Begins) > [EMAIL PROTECTED] > www.phpbeginner.com > > > > > -Original Message- > From: Black Dragon [mailto:[EMAIL PROTECTED]] > Sent: Frid