[PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
I have encountered a problem when trying to turn -- Use ROT26 for best security
[PHP] Time limit on recursive procedure?
I have a recursive procedure, and I set the time limit each time I enter it: function rec_scan($directory, ..) { set_time_limit (1); if (is_dir($new_file)) { rec_scan ($new_file, ) } } The way I read the manual, the timer should be reset each time I call rec_scanl, but I seem to have to set a longer time limit than I would have anticipated, and I wonder if in fact the original time limit still applies to the original invocation? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time limit on recursive procedure?
Clancy wrote: > I have a recursive procedure, and I set the time limit each time I > enter it: > > function rec_scan($directory, ..) > { > set_time_limit (1); > > if (is_dir($new_file)) > { > rec_scan ($new_file, ) > } > > } > > > The way I read the manual, the timer should be reset each time I call > rec_scanl, You keep calling it so as long as the execution time between each call is < 1 second, your script will keep going. /Per -- Per Jessen, Zürich (15.4°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
??? Huh ??? - Original Message - From: "דניאל דנון" To: "PHP General List" Sent: Sunday, June 07, 2009 8:11 PM Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' I have encountered a problem when trying to turn -- Use ROT26 for best security -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] best solution to ecommerce web pages
Hi, i'm currently investigating what would be the best solution to develop an e-commerce web site. should i use some PHP template engine like smarty or CMS like Joomla, Drupal ? thanks a lot, -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] best solution to ecommerce web pages
Alain Roger wrote: > Hi, > > i'm currently investigating what would be the best solution to develop an > e-commerce web site. > should i use some PHP template engine like smarty or CMS like Joomla, Drupal > ? > > thanks a lot, > > Joomla +++ -- Extra details: OSS:Gentoo Linux profile:x86 Hardware:msi geforce 8600GT asus p5k-se location:/home/muhsin language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS Typo:40WPM url:http://mambo-tech.net url:http://blog.mambo-tech.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
I think that he is talking about uri rewriting :O On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann wrote: > ??? Huh ??? > > > - Original Message - From: "דניאל דנון" > To: "PHP General List" > Sent: Sunday, June 07, 2009 8:11 PM > Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' > > > > I have encountered a problem when trying to turn >> >> -- >> Use ROT26 for best security >> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
:D
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
if I send half messages tell me, since gmail is slow so sometimes I click 10 times on the "send"... On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun wrote: > I think that he is talking about uri rewriting :O > > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann wrote: > >> ??? Huh ??? >> >> >> - Original Message - From: "דניאל דנון" >> To: "PHP General List" >> Sent: Sunday, June 07, 2009 8:11 PM >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' >> >> >> >> I have encountered a problem when trying to turn >>> >>> -- >>> Use ROT26 for best security >>> >>> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > -- Use ROT26 for best security -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
Don't forget to send a copy to the list ;) Regarding your function, I'm writing it right now, it would probably have some issues but I think that it would work: function somefunction($v) { preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m); return array($m[1] => array($m[2] => $m[3])); } HTH, Nitsan On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון wrote: > its related to that but I'm building a kind of "supposed" urls for > certain things... Its complicated to explain, > But I need to turn > print_r($var); // alpha/beta/gamma > > $var = somefunction($var); > > print_r($var); // array("alpha" => array("beta" => "gamma")) > > > On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun wrote: > > I think that he is talking about uri rewriting :O > > > > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann wrote: > > > >> ??? Huh ??? > >> > >> > >> - Original Message - From: "דניאל דנון" > >> To: "PHP General List" > >> Sent: Sunday, June 07, 2009 8:11 PM > >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' > >> > >> > >> > >> I have encountered a problem when trying to turn > >>> > >>> -- > >>> Use ROT26 for best security > >>> > >>> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > -- > Use ROT26 for best security >
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
problem is number of "/" is unknown. It can be alpha/beta alpha/beta/gamma alpha/beta/gamma/delta ... (here's a copy to the nice list =] ) On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun wrote: > Don't forget to send a copy to the list ;) > > Regarding your function, I'm writing it right now, it would probably have > some issues but I think that it would work: > > function somefunction($v) > { > preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m); > return array($m[1] => array($m[2] => $m[3])); > } > > > HTH, > Nitsan > > On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון wrote: >> >> its related to that but I'm building a kind of "supposed" urls for >> certain things... Its complicated to explain, >> But I need to turn >> print_r($var); // alpha/beta/gamma >> >> $var = somefunction($var); >> >> print_r($var); // array("alpha" => array("beta" => "gamma")) >> >> >> On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun wrote: >> > I think that he is talking about uri rewriting :O >> > >> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann wrote: >> > >> >> ??? Huh ??? >> >> >> >> >> >> - Original Message - From: "דניאל דנון" >> >> To: "PHP General List" >> >> Sent: Sunday, June 07, 2009 8:11 PM >> >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' >> >> >> >> >> >> >> >> I have encountered a problem when trying to turn >> >>> >> >>> -- >> >>> Use ROT26 for best security >> >>> >> >>> >> >> >> >> -- >> >> PHP General Mailing List (http://www.php.net/) >> >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> >> > >> >> >> >> -- >> Use ROT26 for best security > > -- Use ROT26 for best security -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
Can you give me an example of the output in case that the input is "alpha/beta/gamma/delta" please? On Sun, Jun 7, 2009 at 2:56 PM, דניאל דנון wrote: > problem is number of "/" is unknown. > It can be alpha/beta > alpha/beta/gamma > alpha/beta/gamma/delta > ... > > On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun wrote: > > Don't forget to send a copy to the list ;) > > > > Regarding your function, I'm writing it right now, it would probably have > > some issues but I think that it would work: > > > > function somefunction($v) > > { > > preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m); > > return array($m[1] => array($m[2] => $m[3])); > > } > > > > > > HTH, > > Nitsan > > > > On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון > wrote: > >> > >> its related to that but I'm building a kind of "supposed" urls for > >> certain things... Its complicated to explain, > >> But I need to turn > >> print_r($var); // alpha/beta/gamma > >> > >> $var = somefunction($var); > >> > >> print_r($var); // array("alpha" => array("beta" => "gamma")) > >> > >> > >> On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun > wrote: > >> > I think that he is talking about uri rewriting :O > >> > > >> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann > wrote: > >> > > >> >> ??? Huh ??? > >> >> > >> >> > >> >> - Original Message - From: "דניאל דנון" < > danondan...@gmail.com> > >> >> To: "PHP General List" > >> >> Sent: Sunday, June 07, 2009 8:11 PM > >> >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' > >> >> > >> >> > >> >> > >> >> I have encountered a problem when trying to turn > >> >>> > >> >>> -- > >> >>> Use ROT26 for best security > >> >>> > >> >>> > >> >> > >> >> -- > >> >> PHP General Mailing List (http://www.php.net/) > >> >> To unsubscribe, visit: http://www.php.net/unsub.php > >> >> > >> >> > >> > > >> > >> > >> > >> -- > >> Use ROT26 for best security > > > > > > > > -- > Use ROT26 for best security >
Re: [PHP] Outputting File To The Browser Failed And Kill Apache
Whenever I will delete the symlink the file will be no more accessible? If so then what will happen if the user still downloading the file during the deletion of it? I'm pretty sure it will cause a stop of the downloading process at the client. I'm also not that much sure whether this is the right solution for that. I'm also not really sure that the apache problem is due to memory issue (I honestly have no idea regarding it's meaning :X ). Any further ideas will be highly appreciated! Thank you Tom for your ideas :) Regards, Nitsan On Sun, Jun 7, 2009 at 1:37 AM, Tom Worster wrote: > On 6/6/09 7:28 AM, "Nitsan Bin-Nun" wrote: > > > The files are one directory up from the www root, because that I don't > want > > straight access to them, only by validation which will be done in this > php > > file. > > > > I'm not an apache expret, do you have any idea how I can run this php > > validation file and then output the file, which is placed in one up > > directory from the www root to the user browser?? > > when you say "validation", do you mean that you perform certain checks on a > given client request in php in order to decide whether or not to allow the > client to download the file? > > i can only think of one thing offhand and it's not high security but it > would make unauthorized access a lot harder. after validating the client > request, create a temporary symlink to the file that the client wants in a > directory under the http root using a random filename. redirect the client > to the symlink and delete it x minutes later. the entropy of the symlink > filename determines how hard it is to guess and its ephemeral existence > makes it hard to discover or reuse. > > i don't know if apache has a way to restrict access by referrer but that > would add an additional level of security, i.e. if apache could be > configured to reject the request to the symlink unless the referrer points > to the server that sent the redirect. > > sorry i can't be of more help. on the other hand, it's not easy to > implement the flow control between the flie and apache and thus to the > client's tcp connection in php so that nothing gets stuck and no buffers > overflow. i'm not really convinced that's a function that belongs in a php > script. > > >
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
$v['alpha']['beta']['gamma'] = 'delta'; (or) array( "alpha" => array("beta" => array("gamma" => "delta"))) ); (sorry, here is a copy to the nice list) On Sun, Jun 7, 2009 at 3:00 PM, Nitsan Bin-Nun wrote: > Can you give me an example of the output in case that the input is > "alpha/beta/gamma/delta" please? > > On Sun, Jun 7, 2009 at 2:56 PM, דניאל דנון wrote: >> >> problem is number of "/" is unknown. >> It can be alpha/beta >> alpha/beta/gamma >> alpha/beta/gamma/delta >> ... >> >> On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun wrote: >> > Don't forget to send a copy to the list ;) >> > >> > Regarding your function, I'm writing it right now, it would probably >> > have >> > some issues but I think that it would work: >> > >> > function somefunction($v) >> > { >> > preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m); >> > return array($m[1] => array($m[2] => $m[3])); >> > } >> > >> > >> > HTH, >> > Nitsan >> > >> > On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון >> > wrote: >> >> >> >> its related to that but I'm building a kind of "supposed" urls for >> >> certain things... Its complicated to explain, >> >> But I need to turn >> >> print_r($var); // alpha/beta/gamma >> >> >> >> $var = somefunction($var); >> >> >> >> print_r($var); // array("alpha" => array("beta" => "gamma")) >> >> >> >> >> >> On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun >> >> wrote: >> >> > I think that he is talking about uri rewriting :O >> >> > >> >> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann >> >> > wrote: >> >> > >> >> >> ??? Huh ??? >> >> >> >> >> >> >> >> >> - Original Message - From: "דניאל דנון" >> >> >> >> >> >> To: "PHP General List" >> >> >> Sent: Sunday, June 07, 2009 8:11 PM >> >> >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' >> >> >> >> >> >> >> >> >> >> >> >> I have encountered a problem when trying to turn >> >> >>> >> >> >>> -- >> >> >>> Use ROT26 for best security >> >> >>> >> >> >>> >> >> >> >> >> >> -- >> >> >> PHP General Mailing List (http://www.php.net/) >> >> >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> -- >> >> Use ROT26 for best security >> > >> > >> >> >> >> -- >> Use ROT26 for best security > > -- Use ROT26 for best security -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'
The final code: > echo ''; > echo var_dump(nitsanush("alpha/beta")); > echo "\n"; > echo var_dump(nitsanush("alpha/beta/gamma")); > echo "\n"; > echo var_dump(nitsanush("alpha/beta/gamma/delta")); > echo "\n"; > echo var_dump(nitsanush("alpha/beta/gamma/delta/nitsan")); > echo "\n"; > echo var_dump(nitsanush("alpha/beta/gamma/delta/nitsan/daniel")); > echo "\n"; > echo ''; > > function nitsanush($v) > { > $a = explode("/", $v); > if (sizeof($a) > 2) > { > $b = $a; > unset($b[0]); > return array($a[0] => nitsanush(implode("/", $b))); > } > else > { > return array($a[0] => $a[1]); > } > } > > // eof > -- Nitsan On Sun, Jun 7, 2009 at 3:17 PM, דניאל דנון wrote: > $v['alpha']['beta']['gamma'] = 'delta'; > > (or) > > array( > "alpha" => array("beta" => array("gamma" => "delta"))) > ); > > > (sorry, here is a copy to the nice list) > > On Sun, Jun 7, 2009 at 3:00 PM, Nitsan Bin-Nun wrote: > > Can you give me an example of the output in case that the input is > > "alpha/beta/gamma/delta" please? > > > > On Sun, Jun 7, 2009 at 2:56 PM, דניאל דנון > wrote: > >> > >> problem is number of "/" is unknown. > >> It can be alpha/beta > >> alpha/beta/gamma > >> alpha/beta/gamma/delta > >> ... > >> > >> On Sun, Jun 7, 2009 at 2:53 PM, Nitsan Bin-Nun > wrote: > >> > Don't forget to send a copy to the list ;) > >> > > >> > Regarding your function, I'm writing it right now, it would probably > >> > have > >> > some issues but I think that it would work: > >> > > >> > function somefunction($v) > >> > { > >> > preg_match("#^([^/]+)/([^/]+)/(.+)$#", $v, $m); > >> > return array($m[1] => array($m[2] => $m[3])); > >> > } > >> > > >> > > >> > HTH, > >> > Nitsan > >> > > >> > On Sun, Jun 7, 2009 at 2:36 PM, דניאל דנון > >> > wrote: > >> >> > >> >> its related to that but I'm building a kind of "supposed" urls for > >> >> certain things... Its complicated to explain, > >> >> But I need to turn > >> >> print_r($var); // alpha/beta/gamma > >> >> > >> >> $var = somefunction($var); > >> >> > >> >> print_r($var); // array("alpha" => array("beta" => "gamma")) > >> >> > >> >> > >> >> On Sun, Jun 7, 2009 at 2:33 PM, Nitsan Bin-Nun > >> >> wrote: > >> >> > I think that he is talking about uri rewriting :O > >> >> > > >> >> > On Sun, Jun 7, 2009 at 2:04 PM, Angus Mann > >> >> > wrote: > >> >> > > >> >> >> ??? Huh ??? > >> >> >> > >> >> >> > >> >> >> - Original Message - From: "דניאל דנון" > >> >> >> > >> >> >> To: "PHP General List" > >> >> >> Sent: Sunday, June 07, 2009 8:11 PM > >> >> >> Subject: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma' > >> >> >> > >> >> >> > >> >> >> > >> >> >> I have encountered a problem when trying to turn > >> >> >>> > >> >> >>> -- > >> >> >>> Use ROT26 for best security > >> >> >>> > >> >> >>> > >> >> >> > >> >> >> -- > >> >> >> PHP General Mailing List (http://www.php.net/) > >> >> >> To unsubscribe, visit: http://www.php.net/unsub.php > >> >> >> > >> >> >> > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Use ROT26 for best security > >> > > >> > > >> > >> > >> > >> -- > >> Use ROT26 for best security > > > > > > > > -- > Use ROT26 for best security >
Re: [PHP] PHP Graphing Libraries...?
On Jun 7, 2009, at 5:37 AM, Richard Heyes wrote: Hi, Can I still link the scatter points with lines for readability? I'm not sure why an API would require a "y" for every "x". I've rarely worked with data sets that follow an exact set of X coords. Then where would the point go if you had no y value? -- Richard Heyes It should simply plot the points (and connecting lines) independently. It should also consider the min/max values of all data sets and create those automatically if you don't set the min/max manually. I wasn't saying that I lacked X values -- rather, I don't have a Y for every X of every other item. For instance, say I logged information at 10 o'clock AM for some events, while I didn't log until 10:30 for other events. I don't want to be forced to place something in 10:00 AM just to make the event spacing work. Perhaps I'm simply asking the wrong question. I find that's often the case with me. Creating it with GD would be simple enough, as the idea isn't rocket science. I simply lack time after my current phase to do so, which is why I was hoping something intuitive existed so I could jump right to it. To restate, the following does *NOT* apply to any data I have: X-TIMES(8, 9, 10, 11) DATA-Y1(200,100,400,600) DATA-Y2(40,23,12,84) ...as DATA-Y2 didn't log data at 8 and 10, but rather at 8:30 and 10:30. Therefore, while I certainly can use an X axis labeled from 8 am to 11 am, I need different X values for some DATA sets. I need to be able to plot completely independent X,Y values -- and still connect them with lines to see trends. Reasonable, no? Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] -less layouts; Ideas welcome
Jim Lucas wrote: Jim Lucas wrote: Since this has been a topic of dicussion, I figured I would add my thoughts. Like I said Jim, that is what you get with CSS... a more versatile design. Don't listen to naysayers. ;-) Keep it up! Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development, DTP, Consulting, and Labels -> PH:> (608) 770-3822| WEB:> http://www.euca.us&http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
Hi, > Reasonable, no? Could be, but I don't follow. A point has an X coord and a Y coord, and with a line chart you simply connect the dots (much like a dot-to-dot). Like the charts here: http://dev.rgraph.net/examples/line.html Or perhaps I'm not quite following (entirely likely) ? -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Converting MP3 to FLV On-The-Fly
Hi Lista I'm trying to figure how I can turn MP3 files into FLV files on the fly using PHP. I'm having a server and I can install 3rd party software in order to accomplish this conversion. I have never dealt before with music file comression or anything similar so I don't know what I should look after or where I should look. Any idea would be very appreciated! Thanks! Nitsan
Re: [PHP] Converting MP3 to FLV On-The-Fly
> Hi Lista > > I'm trying to figure how I can turn MP3 files into FLV files on the fly > using PHP. > I'm having a server and I can install 3rd party software in order to > accomplish this conversion. > > I have never dealt before with music file comression or anything similar > so > I don't know what I should look after or where I should look. > > Any idea would be very appreciated! > > Thanks! > Nitsan > You may want to use some sort of caching, converting media formats is very computationally demanding. You could use FFMPEG to do the conversion. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] smallA framework, over 140 characters for twitter ;)
This is a very small framework for PHP inspired by the framework of Fabien Potencier (http://twitto.org/). $a(); //invoking the action else die("A !f");//controller not found } else die("C !f"); //action not found ?> $c=$_GET['c'];$a=$_GET['a'];if(@include_once('c/'.$c.'.php')){$c=new$c;if(method_exists($c,$a))$c->$a();else die("A !f");}else die("C !f"); http://twitter.com/kyberneees Greetings!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting MP3 to FLV On-The-Fly
I thought of using FFMPEG but I have a bit of experience with it. Any links or more specific directions would be great. On Sun, Jun 7, 2009 at 7:48 PM, wrote: > > Hi Lista > > > > I'm trying to figure how I can turn MP3 files into FLV files on the fly > > using PHP. > > I'm having a server and I can install 3rd party software in order to > > accomplish this conversion. > > > > I have never dealt before with music file comression or anything similar > > so > > I don't know what I should look after or where I should look. > > > > Any idea would be very appreciated! > > > > Thanks! > > Nitsan > > > > You may want to use some sort of caching, converting media formats is very > computationally demanding. You could use FFMPEG to do the conversion. > >
Re: [PHP] PHP Graphing Libraries...?
Hi, > Correct, but do you notice how although you're plotting multiple lines, they > all share X values? They all change direction nicely and neatly at the same > X value. Mine don't do that. I need to plot different X values for each > data set. So if I'm logging values for time, I won't necessarily have the > same increment spacing for each data set. I might have an X-coord at > 5,6,7,8 for one data set, but have another at 5.5,6.5,7.9,9.2 for another > data set. Most of the existing APIs assume you're going to plot nice neat > X-coord values for each data set (e.g. 2005, 2006, 2007, 2008, 2009). Mine > vary for each data set. > I believe Google Charts chart type "cht=lxy"does what I need. Take a look > at that example and notice how the X values vary per data set, they're not > all synchronous. I'm still not sure I get it. What about a Scatter chart with the points connected? Would that be reasonable? With this you'd specify a max X value of say 365 to represent a year, and then plot the values based on that, ie: 67,57|234,80|57,89 ad infinitum. Then just connect the points. If there's a pattern, it would become apparent. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting MP3 to FLV On-The-Fly
I would also batch it. Keeping a user waiting (unless you have a "please wait..." screen, which still can take some time and be a bad user experience) in my experience hasn't been ideal and won't scale very well. On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun wrote: > I thought of using FFMPEG but I have a bit of experience with it. > Any links or more specific directions would be great. > > On Sun, Jun 7, 2009 at 7:48 PM, wrote: > >> > Hi Lista >> > >> > I'm trying to figure how I can turn MP3 files into FLV files on the fly >> > using PHP. >> > I'm having a server and I can install 3rd party software in order to >> > accomplish this conversion. >> > >> > I have never dealt before with music file comression or anything similar >> > so >> > I don't know what I should look after or where I should look. >> > >> > Any idea would be very appreciated! >> > >> > Thanks! >> > Nitsan >> > >> >> You may want to use some sort of caching, converting media formats is very >> computationally demanding. You could use FFMPEG to do the conversion. >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting MP3 to FLV On-The-Fly
I don't have to let the user wait. The conversions will be done once 3 hours using a cron job, they all will be listed in a mysql database. On Sun, Jun 7, 2009 at 8:09 PM, Michael Shadle wrote: > I would also batch it. Keeping a user waiting (unless you have a > "please wait..." screen, which still can take some time and be a bad > user experience) in my experience hasn't been ideal and won't scale > very well. > > On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun > wrote: > > I thought of using FFMPEG but I have a bit of experience with it. > > Any links or more specific directions would be great. > > > > On Sun, Jun 7, 2009 at 7:48 PM, wrote: > > > >> > Hi Lista > >> > > >> > I'm trying to figure how I can turn MP3 files into FLV files on the > fly > >> > using PHP. > >> > I'm having a server and I can install 3rd party software in order to > >> > accomplish this conversion. > >> > > >> > I have never dealt before with music file comression or anything > similar > >> > so > >> > I don't know what I should look after or where I should look. > >> > > >> > Any idea would be very appreciated! > >> > > >> > Thanks! > >> > Nitsan > >> > > >> > >> You may want to use some sort of caching, converting media formats is > very > >> computationally demanding. You could use FFMPEG to do the conversion. > >> > >> > > >
Re: [PHP] Converting MP3 to FLV On-The-Fly
These is a PHP binding for FFMPEG here: http://ffmpeg-php.sourceforge.net/, though most of the tutorials you will find are for the C API, for example http://www.dranger.com/ffmpeg/, which demonstrates how to implement a media player. Personally I would just skip using the API and use the CLI program to convert the media, and cache/ serve from the resulting file, much easier to implement. > I thought of using FFMPEG but I have a bit of experience with it. > Any links or more specific directions would be great. > > On Sun, Jun 7, 2009 at 7:48 PM, wrote: > >> > Hi Lista >> > >> > I'm trying to figure how I can turn MP3 files into FLV files on the >> fly >> > using PHP. >> > I'm having a server and I can install 3rd party software in order to >> > accomplish this conversion. >> > >> > I have never dealt before with music file comression or anything >> similar >> > so >> > I don't know what I should look after or where I should look. >> > >> > Any idea would be very appreciated! >> > >> > Thanks! >> > Nitsan >> > >> >> You may want to use some sort of caching, converting media formats is >> very >> computationally demanding. You could use FFMPEG to do the conversion. >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting MP3 to FLV On-The-Fly
On Sun, Jun 7, 2009 at 11:23 AM, wrote: > These is a PHP binding for FFMPEG here: > http://ffmpeg-php.sourceforge.net/, though most of the tutorials you will > find are for the C API, for example http://www.dranger.com/ffmpeg/, which > demonstrates how to implement a media player. > Personally I would just skip using the API and use the CLI program to > convert the media, and cache/ serve from the resulting file, much easier > to implement. +1 the ffmpeg-php module would be great if it got into PECL and got more support. right now it has some flaws and is not fully featured. it can be useful for things like identifying media but i am not sure how well it would be for conversion and other things. A client of mine had a conversion script created which leveraged ffmpeg-php for identification of aspect ratio and other things, but then went to system() for the conversion calls. >> I thought of using FFMPEG but I have a bit of experience with it. system("ffmpeg -i $inputfile output.wav"); i think is really a basic example. tweak the audio specifics as you wish (man ffmpeg - it's got a ton of options) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Time limit on recursive procedure?
On Sun, 07 Jun 2009 13:04:20 +0200, p...@computer.org (Per Jessen) wrote: >Clancy wrote: > >> I have a recursive procedure, and I set the time limit each time I >> enter it: >> >> function rec_scan($directory, ..) >> { >> set_time_limit (1); >> >> if (is_dir($new_file)) >> { >> rec_scan ($new_file, ) >> } >> >> } >> >> >> The way I read the manual, the timer should be reset each time I call >> rec_scanl, > >You keep calling it so as long as the execution time between each call >is < 1 second, your script will keep going. > >/Per Thanks. That's what I thought. I'm using it to back up my working directory to another drive, and a 3 second limit wasn't long enough, so one of the directories must take longer than I expected to copy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: List files in a directory using filters and exclusions
On Sat, 6 Jun 2009 21:39:15 -0400 (CDT), rsantama...@hab.uci.cu ("Rolando Santamaria Maso") wrote: >Hi PHP community, here I bring a very simple and interesting function that >I made for a project, it's objetive is "to list path files in a directory >with the possibility of using filters and exclusions". > >What do you think about? >--- > >function get_files($path, &$result, Array $exclusions, Array $filters) >{ >@$dir_content = scandir($path); > if ($dir_content) >{ >$end= count($dir_content); >$i = 2; > >for ($i; $i < $end; $i++) >{ >$path_and_element = $path.'/'.$dir_content[$i]; >if (array_search($path_and_element, $exclusions) === false) >{ >if (array_search(substr($dir_content[$i], >strlen($dir_content[$i]) - 4), $filters) !== false) >{ >$result[] = $path_and_element; >} > > if (is_dir($path_and_element)) >{ >get_files($path_and_element, $result, $exclusions, >$filters); >} >} > } > } >} > > >$path = '/var/www'; >$result = array(); >$exclusions = array('/var/www/drupal', '/var/www/wp'); >$filters= array('.php'); > >get_files($path, $result, $exclusions, $filters); > >echo ""; >print_r($result); >die(); I have just written a recursive backup program, and used a slightly different exclusion procedure: $exclusions = array ('...drupal' => true, 'Images' =>'true', ); if (!isset($exclusions[$file])) { [copy file to backup ] } This looks simpler, and therefore quicker, but I suspect it is just putting the complexity out of sight! > > >Greetings > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Source Code Analysis
On Wed, Oct 22, 2008 at 4:30 PM, Dee Ayy wrote: > Thanks regarding the error_reporting. I may have to go this route for > this specific issue. > ... > ... And not only for this specific issue. I have another need for a SCA tool. Is there an existing tool similar to a broken link checker, but instead of looking for links, it would look for "include" and "require" type commands and list a hierarchy of all files used in the project, starting from a given input file? It should get a list of files used in a production deployment beginning from say "index.php", and compare that to a list of files used in a project undergoing development from say "index_dev.php"? At a minimum, (from what I can think of), it would have to resolve define's that may be referenced in "include/require" as well as links as in a broken link checker tool. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php