[PHP] playing sounds
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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] check if an url is valid
ok, I'll try with socket. Thanks no, sockets are not a bad solution at all. They are just as fast. And plus fsockopen has more functionality such as timing out, result messages, mess_num etc... what fopen doesn't have. I think fsockopen is better for 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: Friday, April 27, 2001 6:41 AM To: [EMAIL PROTECTED] Subject: [PHP] check if an url is valid 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? I would a function that return true/false if an url is/not is valid; without error to browser Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] check if an url is valid
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? I would a function that return true/false if an url is/not is valid; without error to browser Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] setting the name of the file in Save As windows
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( $fd , filesize ($filename)); echo ($data); fclose ($fd); This work, but when the user tries to save the file on his disk the script set as file name the name of itself! I've tried unsuccesfully to print this header after the first header: header (Content-Disposition: attachment; filename=\WorkPlease.zip\); Can you help me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] (SOLVED)Re: [PHP] setting the name of the file in Save As windows
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/Protocols/rfc2616/rfc2616 says that it must be used the first one (with attachement) :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] translating a function from Perl to PHP
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.\n\n; $testo =~ s/%([a-zA-Z]*)%/$mioArray{$1}/g;# == this is my problem!!! print $testo.\n; This is the output of the script: Hi %NOME%, how are you? Tomorrow I'll go to %DESTINAZIONE% with %AMICO%! Hi Pippo, how are you? Tomorrow I'll go to Roma with Pluto! HELP ME PLEASE!!! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] translating a function from Perl to PHP
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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]