|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 20 May 2003 04:18:15 -0000 Issue 2067
php-general-digest-help
lists.php.net
Date: Mon May 19 2003 - 23:18:15 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 20 May 2003 04:18:15 -0000 Issue 2067
Topics (messages 148182 through 148244):
Re: striping unwanted characters from $string
148182 by: John W. Holmes
striping unwanted characters from $string part.2
148183 by: mailing
Re: ctype_digit
148184 by: Mario Soto
oracle 92 / IIS / windows
148185 by: Joe Price
Array Logic
148186 by: Steve Keller
148192 by: David Otton
How do you enable Virtual Directory Support
148187 by: David Reta
compiler in php..
148188 by: Aric Caley
148189 by: Rasmus Lerdorf
148222 by: Aric Caley
148223 by: Rasmus Lerdorf
148230 by: Aric Caley
ldap_search
148190 by: Mike Tuller
Class and variable scope
148191 by: Gerard Samuel
148194 by: David Otton
148227 by: Gerard Samuel
Re: running a function on an eregi-substring
148193 by: David Otton
148195 by: DvDmanDT
question of Object
148196 by: Yann Larrivee
148200 by: Yann Larrivee
148243 by: Tom Rogers
Default values
148197 by: Sano
148211 by: Jim Lucas
ID3 tag extraction
148198 by: Jay Blanchard
148203 by: David Otton
148205 by: Jay Blanchard
148209 by: David Otton
148212 by: Manuel Lemos
148213 by: Manuel Lemos
composed variables
148199 by: Michael Timinger
148202 by: Jay Blanchard
148204 by: Catalin Trifu
148206 by: Michael Timinger
148208 by: Leif K-Brooks
Re: while....for....problem
148201 by: Simon
permission denied, but I have permissions
148207 by: Chris . Antharia
execute and write, or execute or write
148210 by: Chris . Antharia
php and frames...
148214 by: Bruce Douglas
148215 by: John W. Holmes
148216 by: Jason Wong
148217 by: Bruce Douglas
148218 by: Steve Keller
148219 by: Jason Wong
148221 by: Steve Keller
148225 by: PHP4 Emailer
148226 by: Steve Keller
148231 by: Rolf Brusletto
148232 by: daniel.electroteque.org
GET ID_3
148220 by: Michiel van Heusden
Generating a Static HTML Page from PHP
148224 by: Mike Papper
148228 by: Chris Hayes
148229 by: David Otton
Problem with IF..
148233 by: Peter \"Beholder\" Frankenfeldt
PHP compiler?
148234 by: Ilkka Huotari
148235 by: Manuel Lemos
148236 by: daniel.electroteque.org
148237 by: Ilkka Huotari
148238 by: John W. Holmes
148240 by: Maxim Maletsky
148241 by: Manuel Lemos
query totalrows + thousands of results slow in pagination function
148239 by: daniel.electroteque.org
148242 by: John W. Holmes
faster output from php and postgres --please help!
148244 by: Mukta Telang
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
> I have a problem in that if a user inputs a string with ' in it the
> dynamically generated links will not work, as they read the ' as the
end
> of
> the string (yeah?)
>
> I have read the manual regarding htmlspecialchars, stripcslashes,
> htmlentities, stristr and so on....but I find it all very confusing -
> which
> am I supposed to use? and are there other characters that could cause
a
> similar thing?
Sounds like you need urlencode(), actually.
If you have something like this:
<a href='link.php?var=$var'>Link</a>
and $var has a ' in it, it'll break like you're saying. So use
urlencode() on $var before you insert it into the link. Decoding is
automatic on the next page, so you do not have to worry about that.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
attached mail follows:
Many thanks to those that replied with my previous query.
However the problem continues in another guise.
Here is my link:
print("<a
href=\"javascript:openWin5('tellafriend.php?id=$siteid&title=$sitetitle')\">
<img src='images/image_icons/edit.gif' border='0'> $tell_a_friend</a>;");
The problem is with the $title variable. If the $title contains things
like:
Müller
Amoré
then the ü and é look very ugly in any dynamically generated links changeing
to things like %33 etc, and any word like:
nation¹s
We're
break the link, is there a way that I can strip the ''s and automatically
change things like ü and é to u and e ?
Many thanks once again
James
attached mail follows:
----- Original Message -----
From: "Ryan A" <ryan
jumac.com>
To: "Dan Joseph" <djoseph
duhq.us>
Cc: <php-general
lists.php.net>
Sent: Thursday, May 15, 2003 2:12 PM
Subject: Re: [PHP] ctype_digit
> Crap, i cant do that coz i am hosting on a virtual server and i am pretty
> sure they dont have php 4.3.1 either.
> :-(
> I guess i will have to go with is_int()
...or you can still try JavaScript for the result form page, and still check it in the php script if you can...
>
> Cheers,
>
> -Ryan
>
>
> > Hi,
> >
> > You'll need to compile PHP with the ctype functions enabled. I don't know
> > how to do this personally, I run 4.3.1 and it was automatic, check
> > www.php.net.
> >
> > -Dan Joseph
> >
> > > -----Original Message-----
> > > From: Ryan A [mailto:ryan
jumac.com]
> > > Sent: Thursday, May 15, 2003 4:04 PM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] ctype_digit
> > >
> > >
> > > Hi all,
> > > this:
> > > if (!ctype_digit($price))
> > > {echo 'Error:<b>Price</b> can contain numbers only. Please go
> > > back and make
> > > the necessary changes';
> > > exit;
> > > }
> > >
> > >
> > >
> > > is throwing me an error
> > >
> > > "Call to undefined function: ctype_digit() in
> > > c:\phpdev\www......on line 24"
> > >
> > > any idea why?
> > >
> > > Cheers,
> > > -Ryan
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Mario Soto
mario_s
amigo.net.gt
-.-.-.-
attached mail follows:
Hello, I have PHP running ISAPI on IIS on windows XP (currently, going to
deploy on 2000). My requirements are to connect to Oracle 92 DB and present
data using charts using GD image functions from PHP. I have PHP and GD
working fine. The Oracle functionality is still problematic. I finally got
rid of the 'cannot load oracle oci dll' messages, permisions of course.. Now
when I try to connect to the db I get this:
Warning: _oci_open_server: in c:\inetpub\wwwroot\php\oracle.php on line
3
<refresh>
Warning: _oci_open_server: `Wí in c:\inetpub\wwwroot\php\oracle.php on line
3
<refresh>
Warning: _oci_open_server: `Wõ in c:\inetpub\wwwroot\php\oracle.php on line
3
Note how the error message changes slightly when I refresh.
Now oracle connectivity works with for instance TOAD, so i think its php
specific.
Any suggestions?
Thank You!
-Joe Price
attached mail follows:
Perhaps there's a function for this, but I've been unable to find it, and
none of the key word searches I've done on the archive have turned up the
response I'm looking for.
The question is this, what's the easiest way to add an element to the
middle of an array with numeric keys and shift all of the other elements
down one?
For example, I create an array called $a
Array
(
[0] => lime
[1] => coconut
[2] => rum
[3] => ice
)
And I want to add "seltzer" as element 2 and shift the others down 1. So
now my array looks like:
Array
(
[0] => lime
[1] => coconut
[2] => seltzer
[3] => rum
[4] => ice
)
I've looked, but couldn't find a function to do this. The only way I've
come up with to do it is with a loop.
$fillElement = 2;
for ($i=$count($myArray); $i>$fillElement; $i--) {
$myArray[$i] = $myArray[$i-1];
}
$myArray[$fillElement] = "seltzer";
Anyone got a better idea?
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller
healthtvchannel.org
Web: www.healthtvchannel.org
attached mail follows:
On Mon, 19 May 2003 09:50:31 -0800, you wrote:
>The question is this, what's the easiest way to add an element to the
>middle of an array with numeric keys and shift all of the other elements
>down one?
I suppose you could do something like this...
$arrA = array("apple", "orange", "banana", "pear", "peach");
$insertBefore = 3;
$toInsert = "potato";
$arrB = array_merge(array($toInsert), array_slice($arrA, $insertBefore));
$arrC = array_merge(array_slice($arrA, 0, $insertBefore), $arrB);
print_r($arrC);
Which is generalised to inserting n elements, rather than 1.
But it's effectively the same thing with different syntax and much more
memory use. To be honest, I'd bet that your simple loop would be faster. If
I were you I'd wrap your loop up as my_array_insert(), and not worry about
it too much.
attached mail follows:
Is there a switch in the php.ini file that I am missing that enables Virtual
Directory Support?
Thanks,
David
attached mail follows:
I'm trying to write a simple compiler in php. Actualy it will be more akin
to C's preprocessor with similar syntax. I've been trying to find a php
version of Yacc or other tools to aid in making such a compiler *in* php,
but I can't find anything.
I figure I will need a basic tree datastructure class to put the parsed
commands into, but I can't find one suitable (the pear tree class seems like
overkill as I dont need to save or load the tree data from xml or a db).
Anybody got any ideas on how to make a simple C-like preprocessor for php,
written in php?
attached mail follows:
php.net/tokenizer
On Mon, 19 May 2003, Aric Caley wrote:
> I'm trying to write a simple compiler in php. Actualy it will be more akin
> to C's preprocessor with similar syntax. I've been trying to find a php
> version of Yacc or other tools to aid in making such a compiler *in* php,
> but I can't find anything.
>
> I figure I will need a basic tree datastructure class to put the parsed
> commands into, but I can't find one suitable (the pear tree class seems like
> overkill as I dont need to save or load the tree data from xml or a db).
>
> Anybody got any ideas on how to make a simple C-like preprocessor for php,
> written in php?
>
>
>
>
attached mail follows:
I had thought of that, but, if I'm doing a C-style preprocessor:
#define blah
It just comes back as a comment with the tokenizer. The syntax of the
commands wont be PHP code anyway. And I dont necessarily want to parse all
of the php code since I'm not going to be doing anything with it (well,
later, I may try to add macro expansion in the php code, but not now..).
Additionaly, I need also to parse and compile the same commands in a
different syntax that resembles the typical html templates, ie, {variable}
and <!-- BEGIN block --> and <!-- END block -->. I dont think the php
tokenizer would help much here.
I understand the basics behind a compiler, I was just hoping there were some
tools to help with writing a compiler in PHP, even a good, fast tree class
would help...
(and for those curious what I'm doing, I'm trying to make a Frame Processor
for PHP, as described in the book "Framing Software Reuse". I want it to
run dynamicaly so you dont have to add a compile step.)
"Rasmus Lerdorf" <rasmus
lerdorf.com> wrote in message
news:Pine.LNX.4.44.0305191109291.1158-100000
thinkpad.lerdorf.com...
> php.net/tokenizer
>
> On Mon, 19 May 2003, Aric Caley wrote:
>
> > I'm trying to write a simple compiler in php. Actualy it will be more
akin
> > to C's preprocessor with similar syntax. I've been trying to find a php
> > version of Yacc or other tools to aid in making such a compiler *in*
php,
> > but I can't find anything.
> >
> > I figure I will need a basic tree datastructure class to put the parsed
> > commands into, but I can't find one suitable (the pear tree class seems
like
> > overkill as I dont need to save or load the tree data from xml or a db).
> >
> > Anybody got any ideas on how to make a simple C-like preprocessor for
php,
> > written in php?
> >
> >
> >
> >
>
attached mail follows:
On Mon, 19 May 2003, Aric Caley wrote:
> (and for those curious what I'm doing, I'm trying to make a Frame Processor
> for PHP, as described in the book "Framing Software Reuse". I want it to
> run dynamicaly so you dont have to add a compile step.)
That's nuts! Do you have any idea how slow that would be?
-Rasmus
attached mail follows:
I always enjoy getting a reaction, positive or negative..
Considering its a really simple "language" I don't see why it would be all
that slow. There are templating engines that have pretty much full blown
internal languages so I dont see it being any slower than those. I dont
wish to start a war over template engines, but I've looked at things like
smarty, with full blown programming -- functions, variables, loops, etc.
What I'm proposing is actualy simpler. Yeah, if you really used the frame
programming concept to the max, you might end up with more files and more
overhead, but I dont see it really being that much worse. I see php
applications already that need to load dozens of files, parse multiple
templates and config files, not to mention SQL queries...
Naturaly, on a production server, you'd have the resulting code cached; or
you'd run the compiler once and upload the result only. I'm just saying
having it run automaticaly as part of the script would be convenient when
developing since you dont have to compile PHP code. At some point it may
very well make sense to have a C program do it. Or perhaps a PHP
extension/module?
"Rasmus Lerdorf" <rasmus
lerdorf.com> wrote in message
news:Pine.LNX.4.44.0305191545470.1158-100000
thinkpad.lerdorf.com...
> On Mon, 19 May 2003, Aric Caley wrote:
> > (and for those curious what I'm doing, I'm trying to make a Frame
Processor
> > for PHP, as described in the book "Framing Software Reuse". I want it
to
> > run dynamicaly so you dont have to add a compile step.)
>
> That's nuts! Do you have any idea how slow that would be?
>
> -Rasmus
>
attached mail follows:
I am trying to create a page that will search an ldap server for
results that match what a user inputs for a department or a location. I
can do one, or the other, but I can't do both search by department and
location. Here is the code that works for me.
$department = "CED-Office";
$location = "LC/DC";
if ($ldap)
{
// Search surname entry
$sr=ldap_search($ldap,"o=ISD11, c=US",
"physicaldeliveryofficename=$location");
This only does a search by location. How can I have it so that I can do
a search by location and department without getting an error?
Thanks,
Mike
attached mail follows:
Im declaring a variable in a class constructor, and then including
another file which depends on this declared variable.
In this included file, the variable behaves as if it wasn't even set.
I've provided some mock code to explain what Im using.
If you need more info, feel free to ask. Thanks.
Class file
-----
<?php
class Class
{
function Class()
{
$foo = 'some-value';
include('./bar.php');
}
}
?>
bar.php
-------
<?php
global $foo;
if (!isset($foo))
{
$foo = 'some-default-value';
}
var_dump($foo); // <- Shouldn't $foo be 'some-value' instead of
'some-default-value' here?
?>
attached mail follows:
On Mon, 19 May 2003 14:16:55 -0400, you wrote:
>Im declaring a variable in a class constructor, and then including
>another file which depends on this declared variable.
>In this included file, the variable behaves as if it wasn't even set.
>I've provided some mock code to explain what Im using.
>If you need more info, feel free to ask. Thanks.
>
>Class file
>-----
><?php
>class Class
>{
> function Class()
> {
> $foo = 'some-value';
> include('./bar.php');
> }
>}
>?>
>
>bar.php
>-------
><?php
>global $foo;
>if (!isset($foo))
>{
> $foo = 'some-default-value';
>}
>var_dump($foo); // <- Shouldn't $foo be 'some-value' instead of
>'some-default-value' here?
>?>
Try removing the global statement. Think of the include() as a cut'n'paste
into the body of your constructor... after inclusion the bar.php code is in
the same function as the variable declaration, so it doesn't need it's scope
messed with.
(As to why the global statement is behaving as it is... not a clue).
attached mail follows:
David Otton wrote:
>Try removing the global statement. Think of the include() as a cut'n'paste
>into the body of your constructor... after inclusion the bar.php code is in
>the same function as the variable declaration, so it doesn't need it's scope
>messed with.
>
>(As to why the global statement is behaving as it is... not a clue).
>
I tried commenting out the global statements, and the missing variables
finally appeared.
Unfortunately, for me, the script in question is the database session
handler that comes with ADODB.
There are several places where these variables gets "globalled", and is
messing things up.
So I think I have to code my own session handler, as this one may not
cut it...
Thanks
attached mail follows:
On Mon, 19 May 2003 13:17:17 +0200, you wrote:
>----- Original Message -----
>From: "David Otton" <phpmail
jawbone.freeserve.co.uk>
>To: "Michiel van Heusden" <michiel
aemulatio.nl>
>Cc: <php-general
lists.php.net>
>Sent: Monday, May 19, 2003 1:16 PM
>Subject: Re: [PHP] running a function on an eregi-substring
>> On Mon, 19 May 2003 12:53:37 +0200, you wrote:
>> Having a hard time seeing what you're trying to do. You want your output
>> string to look like this?
>>
>> <b>hello world</b>
>>
>> $output = makebold($content);
>>
>> Or like this?
>>
>> <b></b> world
>>
>> $output = eregi_replace ("hello", makebold(""), $output);
>it should be like:
>$output = "<b>hello</b> world";
>but it's just an example, the actual purpose is a bit too complicated to
>explain
>it's about running the function on the part that eregi takes out..
Ah.... I see. Sounds like you want a callback...
There isn't a POSIX-regex function to do this. You need to use
preg_replace_callback() instead.
http://www.php.net/manual/en/function.preg-replace-callback.php
Lets see....
function makeBold($matches) {
return('<b>' . $matches[0] . '</b>');
}
$t = "hello world";
echo(preg_replace_callback("(hello)", "makeBold", $t));
Let me know if that works for you.
attached mail follows:
My guess is that you want
preg_replace("/(hello)(.*?)/ie","makeBold('\\1').'\\2'",$content);
I think you can add flags to eregi_replace too, not sure though...
"Michiel Van Heusden" <michiel
aemulatio.nl> skrev i meddelandet
news:20030519105530.95251.qmail
pb1.pair.com...
> i'm having trouble using eregi_replace in a script similar to the
following
> don't if this is possible at all but i'd like to know if this is possible,
> how to fix it, any help?
>
> <?
>
> $content = "hello world";
>
> function makebold ($string) {
> return "<b>" . $string . "</b>";
> }
>
> $output = eregi_replace("hello", makebold(\\0), $content);
>
> echo $output;
>
> ?>
>
>
attached mail follows:
Hi, i have a good question on objects.
I have the fallowing classes Page, Elements,Menu,Product , Var (containt
the post, get, session...) , Db and Error
Page is created once, and i beleive that Db should be created once too.
But at the moment it is created in every class that needs to execute a
query.
I dont find it too nice to do aggregation inside of every class. So i
would like to put this Class on a higher level.
Avisouly i dont want to do Db to extend all the classes because it would
not be to pretty either.
Plus using globals,... hummm
So is there a way to do what i am looking for without using globals and
having Db extend every class that do a connection to the Database ?
Thanks
Yann Larrivee
attached mail follows:
Hi,
At the moment we are already making agregation. But we are more looking
into a solution that would enable us to keep the properties of that
object trought all the other objects.
Thanks
Yann
On Mon, 2003-05-19 at 12:53, Burhan Khalid wrote:
> Hello Yann,
>
> Monday, May 19, 2003, 5:25:11 PM, you wrote:
>
> YL> Hi, i have a good question on objects.
>
> YL> I have the fallowing classes Page, Elements,Menu,Product , Var (containt
> YL> the post, get, session...) , Db and Error
>
> YL> Page is created once, and i beleive that Db should be created once too.
> YL> But at the moment it is created in every class that needs to execute a
> YL> query.
>
> [ snip ]
>
> YL> So is there a way to do what i am looking for without using globals and
> YL> having Db extend every class that do a connection to the Database ?
>
> Here is an example :
>
> class db { function init() { mysql_connect(....) } [..] }
>
> class myclass {
>
> var $db;
>
> /* ---- */
>
> function init() {
>
> $this->db = new db();
> $this->db->init();
> ...
> }
> }
>
> A few things to note :
>
> Database connection handles are not passed in sessions, and neither
> are references. So if you are wanting an object to persist across
> sessions, on each page you will have to open a new connection to the
> database.
>
> If you are confused as to what each object has in its variables,
> you can use this snippet to see a listing of all object vars :
>
> $foo = new myclass();
> echo "<pre>"; print_r(get_object_vars($foo)); echo "</pre>";
>
> --
> Best regards,
> Burhan
> phplist[at]meidomus[dot]com
>
>
attached mail follows:
Hi,
Tuesday, May 20, 2003, 8:25:11 AM, you wrote:
YL> Hi, i have a good question on objects.
YL> I have the fallowing classes Page, Elements,Menu,Product , Var (containt
YL> the post, get, session...) , Db and Error
YL> Page is created once, and i beleive that Db should be created once too.
YL> But at the moment it is created in every class that needs to execute a
YL> query.
YL> I dont find it too nice to do aggregation inside of every class. So i
YL> would like to put this Class on a higher level.
YL> Avisouly i dont want to do Db to extend all the classes because it would
YL> not be to pretty either.
YL> Plus using globals,... hummm
YL> So is there a way to do what i am looking for without using globals and
YL> having Db extend every class that do a connection to the Database ?
YL> Thanks
YL> Yann Larrivee
I use one global array of class references and do a lookup to see if
the class is already registered. Another way would be to setup the db
class and pass the reference to all the other classes.
Example (untested)
class aClass{
var $db;
function aClass(&$db){
$this->db =& $db;
}
}
$db =& new dbclass();
$a = new aClass($db);
--
regards,
Tom
attached mail follows:
Greetings,
what would I have to do to initialize all possible variables with a default
value...
Like any variable name given will return a integer "-1" ???
possible?
mail me please.
sano
szm.sk
thanx
attached mail follows:
I have a nice little function for this.
function alternate(&$a, $b) {
return ( $a = ( $a ? $b : $b ) );
}
this will work as long as you know what you should be expecting.
<?php
function alternate(&$a, $b) {
return ( $a = ( $a ? $b : $b ) );
}
alternate($_POST['query'], '');
$select = "SELECT * FROM table WHERE colName='".$_POST['query']."'";
?>
this would normally cause an error that would stop the script, but since you
have defined the value of $_POST['query'] to something( be it blank) that it
will now not give you an error.
Have fun with it... :)
Jim Lucas
----- Original Message -----
From: "Sano" <sano
szm.sk>
To: <php-general
lists.php.net>
Sent: Saturday, May 17, 2003 2:01 PM
Subject: [PHP] Default values
> Greetings,
> what would I have to do to initialize all possible variables with a
default
> value...
>
> Like any variable name given will return a integer "-1" ???
>
> possible?
>
> mail me please.
> sano
szm.sk
>
> thanx
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Good afternoon,
Has anyone done any ID3 tag extraction with PHP? The info online seems a
little slim. If someone could point me in the right direction I would
appreciate it.
Jay
attached mail follows:
On Mon, 19 May 2003 14:54:33 -0500, you wrote:
>Has anyone done any ID3 tag extraction with PHP? The info online seems a
>little slim. If someone could point me in the right direction I would
>appreciate it.
ID3 or ID3v2?
ID3 is simple... fixed-length fields sitting at the end of the file, taking
up the last 128 bytes. If the ID3 tag is present, the first 3 chars of the
last 128 bytes are "TAG". Just examine the last 128 bytes of a file, bearing
in mind the string lengths in the id3_tag struct below, and you'll have no
problems. (Hint: fill each field with "xxxxxxxxx", "yyyyyyy", etc. then
examine the contents of the tag byte by byte).
ID3v2 is more complex, but is documented fully online.
Here are some bits of C code I wrote long ago that may help. The genre tags
have probably been added to since I last grabbed them out of Winamp. I
didn't bother pasting in the function to read an id3 tag as I think it will
confuse more than help, but it's yours if you want it.
struct id3_tag {
char title[31];
char artist[31];
char album[31];
char year[5];
char comment[31];
unsigned char genre;
};
char genre_tag[255][25] = {
"Blues", "Classic Rock", "Country", "Dance",
"Disco", "Funk", "Grunge", "Hip-Hop",
"Jazz", "Metal", "New Age", "Oldies",
"Other", "Pop", "R&B", "Rap",
"Reggae", "Rock", "Techno", "Industrial",
"Alternative", "Ska", "Death Metal", "Pranks",
"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
"Vocal", "Jazz+Funk", "Fusion", "Trance",
"Classical", "Instrumental", "Acid", "House",
"Game", "Sound Clip", "Gospel", "Noise",
"Alternative Rock", "Bass", "Soul", "Punk",
"Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
"Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
"Electronic", "Pop-Folk", "Eurodance", "Dream",
"Southern Rock", "Comedy", "Cult", "Gangsta",
"Top 40", "Christian Rap", "Pop/Funk", "Jungle",
"Native US", "Cabaret", "New Wave", "Psychadelic",
"Rave", "Showtunes", "Trailer", "Lo-Fi",
"Tribal", "Acid Punk", "Acid Jazz", "Polka",
"Retro", "Musical", "Rock & Roll", "Hard Rock",
"Folk", "Folk-Rock", "National Folk", "Swing",
"Fast Fusion", "Bebob", "Latin", "Revival",
"Celtic", "Bluegrass", "Avantgarde", "Gothic Rock",
"Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
"Big Band", "Chorus", "Easy Listening", "Acoustic",
"Humour", "Speech", "Chanson", "Opera",
"Chamber Music", "Sonata", "Symphony", "Booty Bass",
"Primus", "Porn Groove", "Satire", "Slow Jam",
"Club", "Tango", "Samba", "Folklore",
"Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle",
"Duet", "Punk Rock", "Drum Solo", "Acapella",
"Euro-House", "Dance Hall", "Goa", "Drum & Bass",
"Club-House", "Hardcore", "Terror", "Indie",
"BritPop", "Negerpunk", "Polsk Punk", "Beat",
"Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover",
"Contemporary Christian", "Christian Rock", "Merengue", "Salsa",
"Thrash Metal", "Anime", "JPop", "Synthpop",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown", "Unknown",
"Unknown", "Unknown", "Unknown"
};
attached mail follows:
[snip]
ID3 or ID3v2?
[/snip]
Thanks David, that helps some. I found the layout info at id3.org and I
am wanting to do v2.
Jay
attached mail follows:
On Mon, 19 May 2003 16:03:21 -0500, you wrote:
>[snip]
>ID3 or ID3v2?
>[/snip]
>
>Thanks David, that helps some. I found the layout info at id3.org and I
>am wanting to do v2.
Ah, you should have said.
id3v2 is trickier. It's extensible, at the beginning of the file, and can be
big. I never bothered, because my only real interest was in stripping
them...
http://id3.org/id3v2.3.0.html
but I'm sure you found that already. I wouldn't call it slim though...
how about this?
http://www.hotscripts.com/Detailed/20258.html
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=id3v2+php
attached mail follows:
Hello,
On 05/19/2003 04:54 PM, Jay Blanchard wrote:
> Has anyone done any ID3 tag extraction with PHP? The info online seems a
> little slim. If someone could point me in the right direction I would
> appreciate it.
Here you may find a few classes for that purpose:
Classes: Audio
http://www.phpclasses.org/browse.html/class/34.html
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hello,
On 05/19/2003 04:54 PM, Jay Blanchard wrote:
> Has anyone done any ID3 tag extraction with PHP? The info online seems a
> little slim. If someone could point me in the right direction I would
> appreciate it.
Here you may find a few classes for that purpose:
Classes: Audio
http://www.phpclasses.org/browse.html/class/34.html
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hello 2 all!
I am trying to create a composed variable:
I get from a form the amount of variables back, eg. 4
I need now a way to perform something like
while ($i >= $anzVar) {
...
which creates variables: $var1, $var2 and so on.
comprendre?
Thanx in advance!
--
Mit herzlichen Grüßen
Michael Timinger
---------------------------------------
consult
nt
An der Kaiserburg 21
40629 Düsseldorf
---------------------------------------
fon: +49 700 TIMINGER (84646437)
fax: +49 12126 WILDDUCK (94533825)
mail: me
timinger.net
---------------------------------------
"Whatever you can do or dream you can, begin it.
Boldness has genius, power and magic in it."
---------------------------------------
attached mail follows:
[snip]
I am trying to create a composed variable:
I get from a form the amount of variables back, eg. 4
I need now a way to perform something like
while ($i >= $anzVar) {
...
which creates variables: $var1, $var2 and so on.
[/snip]
Michael,
I think we are going to need more information. Do you want to do
something like this...
For ($i = 1; $i < $anzVar; $i++){
$var[$i] = $var . $i;
}
HTH!
Jay
attached mail follows:
Hi,
something like this does the trick:
$i = 0;
$anzVar = 5;
while($i++ <= $anzVar) {
$varname = "var$i";
$$varname = "whatever u want";
}
this would create the following variables:
$var0, $var1, ..., $var4
happy coding,
Catalin
"Michael Timinger" <me
timinger.net> wrote in message
news:20030519201917.13055.qmail
pb1.pair.com...
> Hello 2 all!
> I am trying to create a composed variable:
> I get from a form the amount of variables back, eg. 4
> I need now a way to perform something like
> while ($i >= $anzVar) {
> ...
> which creates variables: $var1, $var2 and so on.
> comprendre?
> Thanx in advance!
>
> --
> Mit herzlichen Grüßen
> Michael Timinger
>
> ---------------------------------------
> consult
nt
> An der Kaiserburg 21
> 40629 Düsseldorf
> ---------------------------------------
> fon: +49 700 TIMINGER (84646437)
> fax: +49 12126 WILDDUCK (94533825)
> mail: me
timinger.net
> ---------------------------------------
> "Whatever you can do or dream you can, begin it.
> Boldness has genius, power and magic in it."
> ---------------------------------------
>
>
attached mail follows:
hello Jay!
The idea behind is to have an universal script, which can handle different
forms, which have a different amount of variables to post, based on a
database. I get back the amount of fields needed (same amount as the
database fields). Because I do not know the amount of variables out of the
form I want to perform that while ... which gives back
$var1=$_POST["val1"]; to $varx ...
Better description?
Thanx for your help!
Mike
"Jay Blanchard" <jay.blanchard
niicommunications.com> schrieb im Newsbeitrag
news:C8F323573C030A448F3E5A2B6FE2070B02A142
nemesis...
[snip]
I am trying to create a composed variable:
I get from a form the amount of variables back, eg. 4
I need now a way to perform something like
while ($i >= $anzVar) {
...
which creates variables: $var1, $var2 and so on.
[/snip]
Michael,
I think we are going to need more information. Do you want to do
something like this...
For ($i = 1; $i < $anzVar; $i++){
$var[$i] = $var . $i;
}
HTH!
Jay
attached mail follows:
An array would be best, but see
http://www.php.net/manual/en/language.variables.variable.php if you
really want to use variable variables.
Michael Timinger wrote:
>Hello 2 all!
>I am trying to create a composed variable:
>I get from a form the amount of variables back, eg. 4
>I need now a way to perform something like
>while ($i >= $anzVar) {
>...
>which creates variables: $var1, $var2 and so on.
>comprendre?
>Thanx in advance!
>
>--
>Mit herzlichen Grüßen
>Michael Timinger
>
>---------------------------------------
>consult
nt
>An der Kaiserburg 21
>40629 Düsseldorf
>---------------------------------------
>fon: +49 700 TIMINGER (84646437)
>fax: +49 12126 WILDDUCK (94533825)
>mail: me
timinger.net
>---------------------------------------
>"Whatever you can do or dream you can, begin it.
>Boldness has genius, power and magic in it."
>---------------------------------------
>
>
>
>
>
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
attached mail follows:
Simon <velikanka
hotmail.com> wrote in message
news:20030519130110.98345.qmail
pb1.pair.com...
I have replace 'for' with another 'while'. So the code looks like:
it is working now as I wanted, but I dont know why it didn't work with 'for'
:(
> <?php
> $query = "SELECT number FROM table";
> $result = mysql_query($query) or die ("Error in query: $query. " .
> mysql_error());
> while($row = mysql_fetch_object($result)) {
> $number= $row->number;
> ?>
> some html
> <?php
> $e=($number+1)/15;
> $c=ceil($e);
while ($i >= 1 and $i <= $c):
$d=($i-1)*15;
> ?>
> <a href="link.php?offsef=<?=$d;?>"><?=$i;?></a>
> <?
$i++;
endwhile;
> ?>
> some html
> <?
> }
> ?>
>
> Problem is in the 'For' part. It doesn't print all '$i', only for the
first
> while loop.
>
> TNX
>
>
attached mail follows:
Interesting problem that my work is pressing me for. I am developing an
upload script, but I ran into permissions problems. So I was given write and
execute access to a directory (on MAC OSX) as other (I have no idea what
apache/php is running as, but other should cover it). I am looking at it
right now, I definitely have other = rw and rx for a couple directories, but
absolutely absolutely cannot read or write to any of them. I am getting
frustrated. Any ideas?
attached mail follows:
another question, to write a file via PHP, regardless of the method (lets
just say doing a file upload), will I need write and execute, or just either
write or execute.
attached mail follows:
hey...
does anyone know of a qucil/efficient way to determine what the current
frame is? PHP_SELF gives you the page... is there a corresponding var that
provides the frame....
the usual search on google didn't turn up anything...
thanks
bruce
bedouglasEarthlink.net
-----Original Message-----
From: Jim Lucas [mailto:phplist
zonedzero.net]
Sent: Monday, May 19, 2003 2:10 PM
To: Sano
Cc: php-general
Subject: Re: [PHP] Default values
I have a nice little function for this.
function alternate(&$a, $b) {
return ( $a = ( $a ? $b : $b ) );
}
this will work as long as you know what you should be expecting.
<?php
function alternate(&$a, $b) {
return ( $a = ( $a ? $b : $b ) );
}
alternate($_POST['query'], '');
$select = "SELECT * FROM table WHERE colName='".$_POST['query']."'";
?>
this would normally cause an error that would stop the script, but since you
have defined the value of $_POST['query'] to something( be it blank) that it
will now not give you an error.
Have fun with it... :)
Jim Lucas
----- Original Message -----
From: "Sano" <sano
szm.sk>
To: <php-general
lists.php.net>
Sent: Saturday, May 17, 2003 2:01 PM
Subject: [PHP] Default values
> Greetings,
> what would I have to do to initialize all possible variables with a
default
> value...
>
> Like any variable name given will return a integer "-1" ???
>
> possible?
>
> mail me please.
> sano
szm.sk
>
> thanx
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> does anyone know of a qucil/efficient way to determine what the current
> frame is? PHP_SELF gives you the page... is there a corresponding var that
> provides the frame....
That's a client side issue, so PHP does not know anything about it unless
you pass that information through a URL or form.
---John Holmes...
PS: Don't hijack messages by changing the subject. Start your own message,
please!
attached mail follows:
On Tuesday 20 May 2003 05:24, Bruce Douglas wrote:
> hey...
Hey
You have started a new thread by taking an existing posting and replying to
it while you changed the subject.
That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.
With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.
Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.
> does anyone know of a qucil/efficient way to determine what the current
> frame is? PHP_SELF gives you the page... is there a corresponding var that
> provides the frame....
[snip]
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Delta: A real man lands where he wants to. -- David Letterman
*/
attached mail follows:
guys it was a cut/paste thing..relax...
but does anyone have answer to the issue....
thanks...
-----Original Message-----
From: Jason Wong [mailto:php-general
gremlins.biz]
Sent: Monday, May 19, 2003 2:31 PM
To: php-general
lists.php.net
Subject: Re: [PHP] php and frames...
On Tuesday 20 May 2003 05:24, Bruce Douglas wrote:
> hey...
Hey
You have started a new thread by taking an existing posting and replying to
it while you changed the subject.
That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.
With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.
Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.
> does anyone know of a qucil/efficient way to determine what the current
> frame is? PHP_SELF gives you the page... is there a corresponding var that
> provides the frame....
[snip]
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Delta: A real man lands where he wants to. -- David Letterman
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
At 5/19/2003 02:37 PM, Bruce Douglas wrote:
> guys it was a cut/paste thing..relax...
It's not a "cut/paste" thing. It's you being lazy.
And I told you several good reasons why you should be starting new threads,
not the least of which is people who are using a text-only client, or who
are reading from the news server, aren't going to see your post in its own
thread, it'll be at the bottom of other threads. If you want people to see
and reply to your cries for help, then why are you hiding your messages
from a good number of the people on this list?
But, then again, you accused me of being the "PHP Police" and ignored
anything I said to you. So good luck getting help.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller
healthtvchannel.org
Web: www.healthtvchannel.org
attached mail follows:
On Tuesday 20 May 2003 05:52, Steve Keller wrote:
> At 5/19/2003 02:37 PM, Bruce Douglas wrote:
> > guys it was a cut/paste thing..relax...
>
> It's not a "cut/paste" thing. It's you being lazy.
What was doubly annoying was that he was too lazy to even delete the parts of
the thread that he hijacked.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Dinner is ready when the smoke alarm goes off.
*/
attached mail follows:
At 5/19/2003 02:53 PM, you wrote:
> as for being lazy... i'll let you have your opinion.. but in the
> future...simply disregard what i or others type... that's the beauty of this
> whole system...you can simply hit the delete button!!! which is what i'll do
> to any follow ups to this...
Look, Bruce, I've made several suggestions to *HELP* you, and you've
continuously dropped a self-righteous attitude on me. If you think my
purpose was to "police" the list, then continue feeling so if it helps you
sleep at night. But as I've pointed out before, and this time, the
suggestion was to help you get more responses to your replies. I even took
the time to explain *WHY* this would help you.
You seem to have a mighty big chip on your shoulder about this issue.
> you see... my email reader allows me to select who/what i choose to
> read/reply to...
It should also allow you to choose to start new threads; but again, that's
something logical that you choose not to do out of some adolescent
rebellion against the "PHP Police."
> i suggest you do the same... and since i'm pretty sure that
> this group is received by a great deal of people... and that i've only had
> 2-3 people complain...
Odd. Before you were saying I was the only one. But this just proves the
point that people aren't reading your posts.
> i'll take that as a statement that this isn't that
> big of a deal..
It's not a "big deal" Bruce, it was intended to *HELP YOU*. But apparently
you choose to keep ignoring that aspect of it and accusing me of forcing
you to behave in a certain order.
I'm sorry you're unable to see a helpful suggestion for what it's intended as.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller
healthtvchannel.org
Web: www.healthtvchannel.org
attached mail follows:
Can't we all just get along, if you guys wanna act like babies over this
fine do so on your own time!! This non sense doesn't need to be posted
here, I have better things to do then to listen to you to whine. Bruce made
a point to email you only steve and yet you felt you had to bring it to
everyone's attention? Why? Seriously, it's a mute subject. It's an email
list for gods sakes, no one's gonna die. I know 2 year olds with more common
sense that this.
Please don't respond to this, take it with a grain of salt and get over it!
I don't have time to read about some problem you two have with each other.
And as every other respectable person here, I think I speak for most of
us.....Let it go!
PS.
I'm including the list as a way of expressing, in my own words and not what
you guys are gonna "cut and paste" however you feel and end up taking it out
of context. Point is, it's over, let it go!
PHP Secret Service (Ok not really, but it goes along with the whole cop
theme!)
-----Original Message-----
From: Steve Keller [mailto:skeller
healthtvchannel.org]
Sent: Monday, May 19, 2003 5:13 PM
To: Bruce Douglas
Cc: php-general
lists.php.net
Subject: RE: [PHP] php and frames...
At 5/19/2003 02:53 PM, you wrote:
> as for being lazy... i'll let you have your opinion.. but in the
> future...simply disregard what i or others type... that's the beauty of
this
> whole system...you can simply hit the delete button!!! which is what i'll
do
> to any follow ups to this...
Look, Bruce, I've made several suggestions to *HELP* you, and you've
continuously dropped a self-righteous attitude on me. If you think my
purpose was to "police" the list, then continue feeling so if it helps you
sleep at night. But as I've pointed out before, and this time, the
suggestion was to help you get more responses to your replies. I even took
the time to explain *WHY* this would help you.
You seem to have a mighty big chip on your shoulder about this issue.
> you see... my email reader allows me to select who/what i choose to
> read/reply to...
It should also allow you to choose to start new threads; but again, that's
something logical that you choose not to do out of some adolescent
rebellion against the "PHP Police."
> i suggest you do the same... and since i'm pretty sure that
> this group is received by a great deal of people... and that i've only
had
> 2-3 people complain...
Odd. Before you were saying I was the only one. But this just proves the
point that people aren't reading your posts.
> i'll take that as a statement that this isn't that
> big of a deal..
It's not a "big deal" Bruce, it was intended to *HELP YOU*. But apparently
you choose to keep ignoring that aspect of it and accusing me of forcing
you to behave in a certain order.
I'm sorry you're unable to see a helpful suggestion for what it's intended
as.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller
healthtvchannel.org
Web: www.healthtvchannel.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
At 5/19/2003 06:14 PM, PHP4 Emailer wrote:
> Bruce made a point to email you only steve and yet you felt you had to
> bring it to everyone's attention? Why?
Because Bruce is not the only one who reads this list who would benefit
from this information.
> Please don't respond to this, take it with a grain of salt and get over it!
Ah, the old "Let me get the last word!" ploy.
> I don't have time to read about some problem you two have with each other.
Then don't.
> And as every other respectable person here, I think I speak for most of
> us.....Let it go!
Ah. You speak for the mailing list now?
> PS.
> I'm including the list as a way of expressing, in my own words and not what
> you guys are gonna "cut and paste" however you feel and end up taking it out
> of context. Point is, it's over, let it go!
PS, I'm replying to the list on this because I don't like being berated for
trying to help someone and then being ordered to shut up and take it.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller
healthtvchannel.org
Web: www.healthtvchannel.org
attached mail follows:
*This message was transferred with a trial version of CommuniGate(tm) Pro*
Steve, I think the points gotten across... I'd rather read through
emails where I could help someone, instead of read your banter.. I would
hope everybody by now, has the point through their heads that you should
not thread-hijack.
Thanks in advance,
Rolf Brusletto
http://www.phpexamples.net
Steve Keller wrote:
>
> At 5/19/2003 06:14 PM, PHP4 Emailer wrote:
>
> > Bruce made a point to email you only steve and yet you felt you had to
> > bring it to everyone's attention? Why?
>
> Because Bruce is not the only one who reads this list who would
> benefit from this information.
>
> > Please don't respond to this, take it with a grain of salt and get
> over it!
>
> Ah, the old "Let me get the last word!" ploy.
>
> > I don't have time to read about some problem you two have with each
> other.
>
> Then don't.
>
> > And as every other respectable person here, I think I speak for most of
> > us.....Let it go!
>
> Ah. You speak for the mailing list now?
>
> > PS.
> > I'm including the list as a way of expressing, in my own words and
> not what
> > you guys are gonna "cut and paste" however you feel and end up
> taking it out
> > of context. Point is, it's over, let it go!
>
> PS, I'm replying to the list on this because I don't like being
> berated for trying to help someone and then being ordered to shut up
> and take it.
>
>
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Email: skeller
healthtvchannel.org
> Web: www.healthtvchannel.org
>
>
attached mail follows:
ok stop flaming i already told him this is a javascript topic
> At 5/19/2003 02:53 PM, you wrote:
>
> > as for being lazy... i'll let you have your opinion.. but in the
> > future...simply disregard what i or others type... that's the beauty
> > of this whole system...you can simply hit the delete button!!! which
> > is what i'll do to any follow ups to this...
>
> Look, Bruce, I've made several suggestions to *HELP* you, and you've
> continuously dropped a self-righteous attitude on me. If you think my
> purpose was to "police" the list, then continue feeling so if it helps
> you sleep at night. But as I've pointed out before, and this time, the
> suggestion was to help you get more responses to your replies. I even
> took the time to explain *WHY* this would help you.
>
> You seem to have a mighty big chip on your shoulder about this issue.
>
> > you see... my email reader allows me to select who/what i choose to
> > read/reply to...
>
> It should also allow you to choose to start new threads; but again,
> that's something logical that you choose not to do out of some
> adolescent rebellion against the "PHP Police."
>
> > i suggest you do the same... and since i'm pretty sure that
> > this group is received by a great deal of people... and that i've
> > only had 2-3 people complain...
>
> Odd. Before you were saying I was the only one. But this just proves
> the point that people aren't reading your posts.
>
> > i'll take that as a statement that this isn't that
> > big of a deal..
>
> It's not a "big deal" Bruce, it was intended to *HELP YOU*. But
> apparently you choose to keep ignoring that aspect of it and accusing
> me of forcing you to behave in a certain order.
>
> I'm sorry you're unable to see a helpful suggestion for what it's
> intended as.
>
>
>
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Email: skeller
healthtvchannel.org
> Web: www.healthtvchannel.org
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
hey there
anybody know about the script 'GET ID_3'?
my problem with the script is that it's used for too many filetypes and
therefore takes too much of servertime
i'm having a hard time reconfiguring it for only 'mp3', 'mpg' and 'wma'..
and i was hoping some of you can help me
for those who don't know "get id 3' but may have similar solutions..i'm
looking for a php-script to (quickly) read the id-3-tag-info out of
mp3/mpg/wma-files..
thanx a lot
michiel
attached mail follows:
Is there a PHP function or some way to cause the HTML output from a PHP
page to be sent directly to a file instead of the client (browser)?
What I would like to do is use a PHP CLI and invoke this PHP script to
generate a HTML page that can be served statically by the web server.
I have thought about using something like JPCache but this will not do all
the things I need.
--
Mike Papper
attached mail follows:
At 00:51 20-5-2003, you wrote:
>Is there a PHP function or some way to cause the HTML output from a PHP
>page to be sent directly to a file instead of the client (browser)?
>
>What I would like to do is use a PHP CLI and invoke this PHP script to
>generate a HTML page that can be served statically by the web server.
>
>I have thought about using something like JPCache but this will not do all
>the things I need.
You could use:
<?PHP
ob_start();
//the entire script
// including HTML bits
// or
//include('whateverfile.php');
$contents=ob_get_contents();
ob_end_clean();
//now save $contents to file
?>
attached mail follows:
On Mon, 19 May 2003 15:51:40 -0700, you wrote:
>Is there a PHP function or some way to cause the HTML output from a PHP
>page to be sent directly to a file instead of the client (browser)?
>
>What I would like to do is use a PHP CLI and invoke this PHP script to
>generate a HTML page that can be served statically by the web server.
There are other ways to do this, but..
From the command line
scriptname.php > filename.html
will dump the output of a script to a file.
From within a script the output control functions allow you access to the
script's output
http://www.php.net/manual/en/ref.outcontrol.php
Use ob_start() to turn on output buffering, and once your script has
finished producing output ob_get_contents() can be used to grab the result,
which you can then do whatever you want with.
attached mail follows:
Hi,
i have a Problem with the marked (>>>) IF function:
for ($j = 0; $j < 3; $j++) {
$elem = reset($planeten);
do {
$color = ImageColorAllocate($im, 50, 255, 50);
>>> if($j == 2) {
$color = ImageColorAllocate($im, 255, 255, 255);
} //fi
imagestring($im, 2, $elem[x] * $sc + ($j * 5), $elem[y] * $sc, $j,
$color);
} while($elem = next($planeten)); //elihw od
}; //rof
When the Array $planeten have more than 126 rows the marked IF function
don't work and will be ignored.
I hope, someone can tell me whats wrong..
I use PHP v4.3.1 on WinXP - IIS.
Thanks,
Peter
attached mail follows:
Hi,
Just an idea and a question.
Will there be a PHP compiler available sometime in the future? I'm talking
about a compiler, which could be used to make plain text script source into
a binary format, and which php interpreter could interpret. The script
parsing phase would be thus left out in the execution time.
I think that software like Zend encoder and Ioncube encoder do this already.
Actually as I think of it, it's a bit surprising that there is not a such
compiler already in PHP distribution?
How about PHP5, is it going to have this? When will it be out?
Ilkka
--
Ilkka Huotari
http://www.visiomode.com/
attached mail follows:
Hello,
On 05/19/2003 10:07 PM, Ilkka Huotari wrote:
> Just an idea and a question.
>
> Will there be a PHP compiler available sometime in the future? I'm talking
> about a compiler, which could be used to make plain text script source into
> a binary format, and which php interpreter could interpret. The script
> parsing phase would be thus left out in the execution time.
>
> I think that software like Zend encoder and Ioncube encoder do this already.
>
> Actually as I think of it, it's a bit surprising that there is not a such
> compiler already in PHP distribution?
Given that Zend Encoder is one of the sources of income of Zend and
Zend people are leaders of the PHP Group, that should not be so hard to
understand. ;-)
> How about PHP5, is it going to have this? When will it be out?
What you are looking for is Turck extension. It was originally a cache
extension but now is also a PHP bytecode optimizer and encoder and
loader all in the same extension. It already supports encoding PHP 5
code. Notice that this is a real encoder much like Zend Encoder, not a
source code encrypting tool.
http://www.turcksoft.com/en/e_mmc.htm
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
wow this sounds all interested i always thought an encoder was to "protect"
the open source code , killa
> Hello,
>
> On 05/19/2003 10:07 PM, Ilkka Huotari wrote:
>> Just an idea and a question.
>>
>> Will there be a PHP compiler available sometime in the future? I'm
>> talking about a compiler, which could be used to make plain text
>> script source into a binary format, and which php interpreter could
>> interpret. The script parsing phase would be thus left out in the
>> execution time.
>>
>> I think that software like Zend encoder and Ioncube encoder do this
>> already.
>>
>> Actually as I think of it, it's a bit surprising that there is not a
>> such compiler already in PHP distribution?
>
> Given that Zend Encoder is one of the sources of income of Zend and
> Zend people are leaders of the PHP Group, that should not be so hard to
> understand. ;-)
>
>
>> How about PHP5, is it going to have this? When will it be out?
>
> What you are looking for is Turck extension. It was originally a cache
> extension but now is also a PHP bytecode optimizer and encoder and
> loader all in the same extension. It already supports encoding PHP 5
> code. Notice that this is a real encoder much like Zend Encoder, not a
> source code encrypting tool.
>
> http://www.turcksoft.com/en/e_mmc.htm
>
> --
>
> Regards,
> Manuel Lemos
>
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> What you are looking for is Turck extension. It was originally a cache
> extension but now is also a PHP bytecode optimizer and encoder and
> loader all in the same extension. It already supports encoding PHP 5
> code. Notice that this is a real encoder much like Zend Encoder, not a
> source code encrypting tool.
>
> http://www.turcksoft.com/en/e_mmc.htm
That is totally cool. Thanks!
Ilkka
attached mail follows:
> What you are looking for is Turck extension. It was originally a cache
> extension but now is also a PHP bytecode optimizer and encoder and
> loader all in the same extension. It already supports encoding PHP 5
> code. Notice that this is a real encoder much like Zend Encoder, not a
> source code encrypting tool.
>
> http://www.turcksoft.com/en/e_mmc.htm
Does anyone use this Turck MMCache? Any opinions on its performance. I
noticed it works on Windows and *nix, which is good.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
attached mail follows:
On Mon, 19 May 2003 22:00:55 -0400
"John W. Holmes" <holmes072000
charter.net> wrote:
> > What you are looking for is Turck extension. It was originally a cache
> > extension but now is also a PHP bytecode optimizer and encoder and
> > loader all in the same extension. It already supports encoding PHP 5
> > code. Notice that this is a real encoder much like Zend Encoder, not a
> > source code encrypting tool.
> >
> > http://www.turcksoft.com/en/e_mmc.htm
>
> Does anyone use this Turck MMCache? Any opinions on its performance. I
> noticed it works on Windows and *nix, which is good.
There are some benchmarks and links on their site to give you the idea.
--
Maxim Maletsky
maxim
php.net
attached mail follows:
Hello,
On 05/19/2003 10:49 PM, daniel
electroteque.org wrote:
> wow this sounds all interested i always thought an encoder was to "protect"
> the open source code , killa
Protecting can mean many things. The more difficult your make it for
somebody to take advantage of your code, the more protected your code is.
Anyway, since PHP 4 the code is already compiled before is executed. The
compiler is part of the Zend engine that ships with every copy of PHP.
The results of the compiler are what is called Zend Op codes that some
people call bytecodes like in the Java world.
What the encoders do is to serialize the compiler results to a file the
disk, ie, store the compilation Zend op codes in a stream of bytes in a
cache file than can be loaded later, thus skipping the compiling phase
on the next time the scripts are run.
What the cache extensions do is practically the same except that instead
of saving the serialized op codes to a disk file, they are saved to
shared memory space that can be accessed by all Web server processes.
So, loading from shared memory is faster than loading from encoded files
which is also faster than recompiling the scripts on the next execution.
Unlike what some people think, encoders do not use encryption because
that would require the scripts to be decrypted before being run and that
would be slow. That does not mean that encoders do not employ any sort
of lightweight (possibly secret) encoding algorithm just to prevent
things like strings to be stored in clear text. That is the part that
usually is not disclosed about commercial encoders.
>>Hello,
>>
>>On 05/19/2003 10:07 PM, Ilkka Huotari wrote:
>>
>>>Just an idea and a question.
>>>
>>>Will there be a PHP compiler available sometime in the future? I'm
>>>talking about a compiler, which could be used to make plain text
>>>script source into a binary format, and which php interpreter could
>>>interpret. The script parsing phase would be thus left out in the
>>>execution time.
>>>
>>>I think that software like Zend encoder and Ioncube encoder do this
>>>already.
>>>
>>>Actually as I think of it, it's a bit surprising that there is not a
>>>such compiler already in PHP distribution?
>>
>>Given that Zend Encoder is one of the sources of income of Zend and
>>Zend people are leaders of the PHP Group, that should not be so hard to
>> understand. ;-)
>>
>>
>>
>>>How about PHP5, is it going to have this? When will it be out?
>>
>>What you are looking for is Turck extension. It was originally a cache
>>extension but now is also a PHP bytecode optimizer and encoder and
>>loader all in the same extension. It already supports encoding PHP 5
>>code. Notice that this is a real encoder much like Zend Encoder, not a
>>source code encrypting tool.
>>
>>http://www.turcksoft.com/en/e_mmc.htm
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
hi there, i have a pagination function which works ok with small resultsets
but noticed a massive change in performance when i used it against
thousands of results , basically there is two queries one to get the
mysql_num_rows total results and the other to append a limit clause to the
query , although i have found this to be slow as it is taking a bit to get
the totalrows first to the tune of 15 secs , it seems to be buffering it
aswell which i dont want , is there a good ideal way to improve this ?
i have tried these SQL_CALC_FOUND_ROWS , count(*) , mysql_unbuffered_query
with no luck , the setting on the server has cache to ON instead of demand
so SQL_NO_CACHE doesnt seem to work , sorry if this maybe off topic but
mysql_num_rows is slow
attached mail follows:
> hi there, i have a pagination function which works ok with small
> resultsets
> but noticed a massive change in performance when i used it against
> thousands of results , basically there is two queries one to get the
> mysql_num_rows total results and the other to append a limit clause to
the
> query , although i have found this to be slow as it is taking a bit to
get
> the totalrows first to the tune of 15 secs , it seems to be buffering
it
> aswell which i dont want , is there a good ideal way to improve this ?
>
> i have tried these SQL_CALC_FOUND_ROWS , count(*) ,
mysql_unbuffered_query
> with no luck , the setting on the server has cache to ON instead of
demand
> so SQL_NO_CACHE doesnt seem to work , sorry if this maybe off topic
but
> mysql_num_rows is slow
You should be using COUNT(*) to get the total number and then your LIMIT
query. This is going to be the fastest (haven't tried
SQL_CALC_FOUND_ROWS, though). I don't know why this isn't the case for
you, though. Maybe it's just a table design issue? Are you doing any
joins?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
attached mail follows:
Hi,
I am dealing with a database with many-to-many relation and have a php
script that joins these tables and displays the output.
But the problem is that after entering some 50 records the output is
very slow!
I can count till 50 before the script produces the output!
The complete description of the problem is written below..
Thanks in advance,
Mukta
description in detail:
database part:
Three tables: paper,author and author_paper
"A paper has many authors and an author has many papers."
In this way there is many to many relation.
The attributes of paper are: paper_id (primary key),title,journal,year
etc
The attributes of author are: author_id(primary key) and name
The attributes of author_paper are: author_id ,paper_id and level
( author with level=1 is the main author of the paper )
php part:
For an author:
1. get author_id from author table
2. select all paper_ids from author_paper table
3. For each of the above selected paper_ids:
a. print all the attributes of paper
b. select all authors of the paper and print their names in the order
of their "level"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]