PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Quarters
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Quarters

Réponse
 
LinkBack Outils de la discussion
Vieux 13/04/2008, 05h23   #26
Bojan Tesanovic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Return an Array and immediately reference an index


On Apr 12, 2008, at 6:18 PM, Casey wrote:

> On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe
> <quickshiftin@gmail.com> wrote:
>> On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo <kolb0057@umn.edu>
>> wrote:
>>
>> search the archives
>>
>> http://www.mail-archive.com/php-gene...msg224626.html
>>
>> -nathan

> <?php
> function ReturnArray() {
> return array('a' => 'f', 'b' => 'g', 'c' => 'h', 'd' => 'i',
> 'e' => 'j');
> }
>
> echo ${!${!1}=ReturnArray()}['a']; // 'f'
> ?>
>
>
> --
> -Casey
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




WOW!! PHP always surprises me, this is the pros of PHP not being
strict type language.

Igor Jocic
http://www.carster.us/





  Réponse avec citation
Vieux 14/04/2008, 10h53   #27
Peter Ford
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Quarters -- ERRORS --

tedd wrote:
> Hi gang:
>
> Sorry for the lame app, but the program worked for Safari (Mac and Win).
> However, I did get it to work for FF and a couple of other browsers (Mac
> and Win), see again:
>
> http://webbytedd.com/quarters
>
> But the critter is dead in the water for all versions of IE -- if -- I
> don't figure out a way around the following single statement.
>
> document.getElementById(id).checked = true;
>
> Granted it's javascript, but all that line does is to set a checkbox
> variable (id) to 'on'. Surely, $M code can do that, right?
>
> After reading a bunch, it seems that M$ has a better way to do things
> (big surprise there, huh?) and thus does not use the
> document.getElementById(id) thing that everyone else in the world uses.
> Instead, they use something "better" and it's not documented well as is
> typical.
>
> Unfortunately, I have not been able to find a M$ work-a-round.
>
> So, what I need is:
>
> if (document.getElementById)
> {
> document.getElementById(id).checked = true;
> }
> else
> {
> <<<<< inset solution here. >>>>>>
> }
>
> All the code has to do is to set a simple checkbox to 'on' in IE.
>
> Anyone have any ideas?
>
> Cheers,
>
> tedd
>
> PS: I'm going to post this on a js list as well.
>
> PPS: You have to wonder how much more technically advanced we would be
> if we weren't always held back by the "what's in it for me"
> shortsightedness of M$.
>
>


What you talkin' bout?
Document.getElementById() works fine in IE5 and later.
There must be some other error.

You could check that document.getElementById(id) is actually returning something
- if it fails it returns null.

Maybe you have given your checkbox a name and not an id, although that should
fail with FF (and Safari) too...

It's fine on IE7 - anything older than IE7 is too broken to be usable, really.



--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
  Réponse avec citation
Vieux 14/04/2008, 15h31   #28
tedd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Quarters -- ERRORS --

>What you talkin' bout?
>Document.getElementById() works fine in IE5 and later.
>There must be some other error.


The error was that I was passing the id as an array and not as a string.

What's interesting is that only IE's would not accept that mistake.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
  Réponse avec citation
Vieux 15/04/2008, 20h40   #29
Zoltán Németh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Quarters

tedd Ãrta:
> Hi gang:
>
> Check out my new game:
>
> http://webbytedd.com/quarters/
>
> What do you think?


that's cool, the only problem is that I lost ten times out of ten

maybe on the weekend I give it a deeper analysis and so I can figure out
the winning strategy - because there must be one, which is used by the
program

greets,
Zoltán Németh

>
> Cheers,
>
> tedd
>
> PS: I originally wrote the game for the Mac over eight years ago.


  Réponse avec citation
Vieux 15/04/2008, 23h17   #30
tedd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Quarters

At 8:40 PM +0200 4/15/08, Zoltán Németh wrote:
>tedd írta:
>>Hi gang:
>>
>>Check out my new game:
>>
>>http://webbytedd.com/quarters/
>>
>>What do you think?

>
>that's cool, the only problem is that I lost ten times out of ten
>
>maybe on the weekend I give it a deeper analysis
>and so I can figure out the winning strategy -
>because there must be one, which is used by the
>program
>
>greets,
>Zoltán Németh


Zoltán:

There's a log story about that game. But briefly,
I was introduced to it by an old man in Bradford
Penn. I remember it cost me at least a case of
beer before I won a single game -- a very
deceptive game, at least it was to me.

But, the program follows a rule based AI
algorithm with a bit of randomness thrown in.

I've condensed winning down to three rules -- it
will be interesting to see if you can figure out
what those rules are. Of course, you could pay $5
and I'll email them to you. :-)

Seriously, I released the game for the Mac in
December 1999. In February, MacWorld ran it as
one of the top ten shareware games and my web
site had over 25,000 downloads that month and the
30+ shareware site out that had the game,
reported a total of over 200,000 downloads.

The original game asked for a self-addressed
stamped envelope with $5 in it and I would mail
the answer back. To my surprise, I received
hundreds of letters and money from all over the
world. Some of the currency would have cost me
more than $5 to cash at my local bank. That was
before PayPal did overseas transactions.

Some of the letters had photographs of the people
who wanted the secret. I specifically remember a
big biker from OZ who sent me a picture of
himself and his bike with a note that he was
going to make more than $5 by betting on the game
in bars. I'm sure he did.

It was a very interesting experience and I've
always wanted to put the game up on my site to
see what would happen. It's not for the money,
but rather the life experience.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
  Réponse avec citation
Vieux 15/04/2008, 23h21   #31
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Quarters

On Tue, Apr 15, 2008 at 5:17 PM, tedd <tedd@sperling.com> wrote:
>
> It was a very interesting experience and I've always wanted to put the game
> up on my site to see what would happen. It's not for the money, but rather
> the life experience.


That being the case, please update the PayPal link to parasane@gmail.com.

Thank you for your cooperation.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 01h04   #32
tedd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHP Speech

Daniel:

Your hosting service provides the capability to turn html text to
speech, as I've done here:

http://php1.net/b/speech/

We use php to generate a sound file and then we use javascript to
play it -- it all works great.

But, how do we delete the file? The php script is history after
presenting the page and javascript can't touch the server, right? So,
how does one delete the wave file?

The only way I can see is to set up a cron job to delete all wave
files after a certain time, but that's kind-of lame. Is there another
way?

Cheers,

tedd


--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
  Réponse avec citation
Vieux 16/04/2008, 02h04   #33
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Tue, Apr 15, 2008 at 7:04 PM, tedd <tedd.sperling@gmail.com> wrote:
>
> Your hosting service provides the capability to turn html text to speech,
> as I've done here:

[snip!]
>
> But, how do we delete the file? The php script is history after presenting
> the page and javascript can't touch the server, right? So, how does one
> delete the wave file?
>
> The only way I can see is to set up a cron job to delete all wave files
> after a certain time, but that's kind-of lame. Is there another way?


Right, but unfortunately, because it's audio that needs to stream,
it can't just be served like an image (think GD or imagemagick) and
then destroyed. There is no way to know how long it will be before
the client receives the entire file, and it would prove to be too much
to store in a reasonable buffer.

That's why I had to write it the way it is. The drawback is that,
yes, unless you're overwriting the file each time (which, with
high-traffic sites, would corrupt larger files mid-download), you
either have to have a script to unlink() the files or a cron to remove
them (or resort to a manual removal).

I'm all ears, eyes, and cerebellum if you've got an idea on how to
fix that though. The next phase should have better speech, I'm just
having a tough time with paid gigs now and find no time to focus on
the fun stuff really. I still don't know why no one ever told us the
truth that, no matter how much we wanted to be Toys 'R' Us kids, the
answer was unscrupulously the same: tough nuts.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 15h37   #34
Thiago Pojda
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RES: [PHP] PHP Speech

{Top Posting}

I don't know if I'm just lazy or stupid (or both).

I went into a similar issue few weeks ago and my solution was to add a
function to delete files created in the last X hours (mine was 24), and call
it on the same script that creates the files.

Which means it tries to clean up old files every time it creates a new one.

Is that any good for you guys?


Regards,
Thiago

-----Mensagem original-----
De: Daniel Brown [mailto:parasane@gmail.com]
Enviada em: terça-feira, 15 de abril de 2008 21:05
Para: tedd
Cc: php-general@lists.php.net
Assunto: Re: [php] PHP Speech

On Tue, Apr 15, 2008 at 7:04 PM, tedd <tedd.sperling@gmail.com> wrote:
>
> Your hosting service provides the capability to turn html text to
> speech, as I've done here:

[snip!]
>
> But, how do we delete the file? The php script is history after
> presenting the page and javascript can't touch the server, right? So,
> how does one delete the wave file?
>
> The only way I can see is to set up a cron job to delete all wave
> files after a certain time, but that's kind-of lame. Is there

another way?

Right, but unfortunately, because it's audio that needs to
stream, it can't just be served like an image (think GD or
imagemagick) and then destroyed. There is no way to know how
long it will be before the client receives the entire file, and
it would prove to be too much to store in a reasonable buffer.

That's why I had to write it the way it is. The drawback
is that, yes, unless you're overwriting the file each time
(which, with high-traffic sites, would corrupt larger files
mid-download), you either have to have a script to unlink() the
files or a cron to remove them (or resort to a manual removal).

I'm all ears, eyes, and cerebellum if you've got an idea on
how to fix that though. The next phase should have better
speech, I'm just having a tough time with paid gigs now and
find no time to focus on the fun stuff really. I still don't
know why no one ever told us the truth that, no matter how much
we wanted to be Toys 'R' Us kids, the answer was unscrupulously
the same: tough nuts.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @
$19.99/mo., and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

--
PHP General Mailing List (http://www.php.net/) To unsubscribe,
visit: http://www.php.net/unsub.php




  Réponse avec citation
Vieux 16/04/2008, 15h53   #35
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 9:37 AM, Thiago Pojda
<thiago.pojda@softpartech.com.br> wrote:
>
> I don't know if I'm just lazy or stupid (or both).


Stupid, definitely not. Lazy.... well, maybe. ;-P

> I went into a similar issue few weeks ago and my solution was to add a
> function to delete files created in the last X hours (mine was 24), and call
> it on the same script that creates the files.
>
> Which means it tries to clean up old files every time it creates a new one.
>
> Is that any good for you guys?


It's a great idea in theory, but my concern is the duration in
which the files are unlink()'d from the system; the function is called
when another file is created - presumably when another user accesses
the page - which then lengthens the time before each user after the
first will be able to see the end result.

Now there is a very long, but very valid, run-on sentence. ;-D

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 15h56   #36
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 7:37 AM, Thiago Pojda <
thiago.pojda@softpartech.com.br> wrote:

> {Top Posting}
>
> I don't know if I'm just lazy or stupid (or both).
>
> I went into a similar issue few weeks ago and my solution was to add a
> function to delete files created in the last X hours (mine was 24), and
> call
> it on the same script that creates the files.
>
> Which means it tries to clean up old files every time it creates a new
> one.
>
> Is that any good for you guys?



it sounds like thats what theyre talking about doing...

i was thinking, maybe put something in the session. a variable to indicate
the file was generated for some page. so like, on the page that the clip is
produced for, you drop a value in the session. maybe a path to the file;
and that would go in some array index like
$_SESSION['lastSoundByte']
so then, at the beginning part of the logic for building a page you include
something along the lines of
if(!empty($_SESSION['lastSoundByte'])) { unlink($_SESSION['lastSoundByte']);
}

that way, you could get rid of them almost as quickly as they are created;
you wont be overwriting any files for different users, and you have the
garuantee that the sound bytes will no longer be required for use by the
clients. because theyve gone to another page and you eliminate any
issue about knowing when the file has been completely downloaded by the
client.

i would still consider a cron as a cleanup script tho...

-nathan

  Réponse avec citation
Vieux 16/04/2008, 15h59   #37
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 7:53 AM, Daniel Brown <parasane@gmail.com> wrote:

> On Wed, Apr 16, 2008 at 9:37 AM, Thiago Pojda
> <thiago.pojda@softpartech.com.br> wrote:
> >
> > I don't know if I'm just lazy or stupid (or both).

>
> Stupid, definitely not. Lazy.... well, maybe. ;-P
>
> > I went into a similar issue few weeks ago and my solution was to add a
> > function to delete files created in the last X hours (mine was 24), and

> call
> > it on the same script that creates the files.
> >
> > Which means it tries to clean up old files every time it creates a new

> one.
> >
> > Is that any good for you guys?

>
> It's a great idea in theory, but my concern is the duration in
> which the files are unlink()'d from the system; the function is called
> when another file is created - presumably when another user accesses
> the page - which then lengthens the time before each user after the
> first will be able to see the end result.



well since i dont have your service dan, im filling in blanks over here;
but, do users get to determine the name of the files that get created by
this script, or at least rename them; that could be very beneficial.

run on sentence #2 ;D

-nathan

  Réponse avec citation
Vieux 16/04/2008, 15h59   #38
Andrew Ballard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 9:53 AM, Daniel Brown <parasane@gmail.com> wrote:
> On Wed, Apr 16, 2008 at 9:37 AM, Thiago Pojda
> <thiago.pojda@softpartech.com.br> wrote:
> >
> > I don't know if I'm just lazy or stupid (or both).

>
> Stupid, definitely not. Lazy.... well, maybe. ;-P
>
>
> > I went into a similar issue few weeks ago and my solution was to add a
> > function to delete files created in the last X hours (mine was 24), and call
> > it on the same script that creates the files.
> >
> > Which means it tries to clean up old files every time it creates a new one.
> >
> > Is that any good for you guys?

>
> It's a great idea in theory, but my concern is the duration in
> which the files are unlink()'d from the system; the function is called
> when another file is created - presumably when another user accesses
> the page - which then lengthens the time before each user after the
> first will be able to see the end result.
>


In addition to the added time, aren't there any problems with race
conditions if two users try to create a file at the same time and each
user's script tries to clean the same files at the same time?

Andrew
  Réponse avec citation
Vieux 16/04/2008, 16h02   #39
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 9:56 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
>
> it sounds like thats what theyre talking about doing...
>

[snip!]
>
> that way, you could get rid of them almost as quickly as they are created;
> you wont be overwriting any files for different users, and you have the
> garuantee that the sound bytes will no longer be required for use by the
> clients. because theyve gone to another page and you eliminate any
> issue about knowing when the file has been completely downloaded by the
> client.


A great idea if the audio is only being used as an embedded object
within a page. However, if a developer wants to use the functions to
create audio clips for another reason, the session expiration won't
work.

Conversely, if a developer wants to use the functions to create
audio clips for another reason, he or she will probably already have a
way of cleaning that up, as well! ;-P

I suppose that further validates the idea.

> i would still consider a cron as a cleanup script tho...


I still think it's the best and most responsible way. However,
I'm also kicking around the idea of giving each member a larger
private tmp directory, that can then be cleaned out using Thiago's
idea - anything older than n hours is deleted by a function run from a
root cron.

And no, to those of you who are on my servers, it won't count
against your disk quota. ;-P

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 16h05   #40
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 7:59 AM, Andrew Ballard <aballard@gmail.com> wrote:

> In addition to the added time, aren't there any problems with race
> conditions if two users try to create a file at the same time and each
> user's script tries to clean the same files at the same time?



ergo, the need to name the files differently; or provide a separate
namespace, such as a per-user sub-directory.

-nathan

  Réponse avec citation
Vieux 16/04/2008, 16h07   #41
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 9:59 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
>
> well since i dont have your service dan, im filling in blanks over here;
> but, do users get to determine the name of the files that get created by
> this script, or at least rename them; that could be very beneficial.


Invalid. You went from a statement, to the posing of a question,
to a semi-colonic (pardon the pun!) statement again. :-D

In any case, yes: the filename can be determined by the user at
the time of the function call. And the file can be renamed, as well;
it's placed wherever the user specifies (provided he or she has
subsequent permission to write to the location, of course).

> run on sentence #2 ;D


You are the weakest link. Goodbye!

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 16h08   #42
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 8:02 AM, Daniel Brown <parasane@gmail.com> wrote:

> On Wed, Apr 16, 2008 at 9:56 AM, Nathan Nobbe <quickshiftin@gmail.com>
> wrote:
> >
> > it sounds like thats what theyre talking about doing...
> >

> [snip!]
> >
> > that way, you could get rid of them almost as quickly as they are

> created;
> > you wont be overwriting any files for different users, and you have the
> > garuantee that the sound bytes will no longer be required for use by the
> > clients. because theyve gone to another page and you eliminate any
> > issue about knowing when the file has been completely downloaded by the
> > client.

>
> A great idea if the audio is only being used as an embedded object
> within a page. However, if a developer wants to use the functions to
> create audio clips for another reason, the session expiration won't
> work.
>


fair enough; but i did address all the aforementioned concerns. you threw
that one at me from left field


>
> Conversely, if a developer wants to use the functions to create
> audio clips for another reason, he or she will probably already have a
> way of cleaning that up, as well! ;-P
>
> I suppose that further validates the idea.
>
> > i would still consider a cron as a cleanup script tho...

>
> I still think it's the best and most responsible way. However,
> I'm also kicking around the idea of giving each member a larger
> private tmp directory, that can then be cleaned out using Thiago's
> idea - anything older than n hours is deleted by a function run from a
> root cron.



i thought this was pretty much what tedd was doing in the first place. i
mean what else do you do w/ a cleanup script? you have to clean the files
that are no longer in use..

And no, to those of you who are on my servers, it won't count
> against your disk quota. ;-P



good man.

-nathan

  Réponse avec citation
Vieux 16/04/2008, 16h10   #43
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 9:59 AM, Andrew Ballard <aballard@gmail.com> wrote:
>
> In addition to the added time, aren't there any problems with race
> conditions if two users try to create a file at the same time and each
> user's script tries to clean the same files at the same time?


With output error buffering (or 'rm -f {FILENAME}') there wouldn't
be. If a tree falls in the woods and no one is there to hear it, it
doesn't make a sound at all. Such is the same with error reporting:
if I'm not told an error occurred, then it didn't. Ignorance is
bliss. ;-P

In reality, you're correct. If the files have the same names, are
in the same location, and are set for removal at the same time, then
yes.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 16h12   #44
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 10:05 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> On Wed, Apr 16, 2008 at 7:59 AM, Andrew Ballard <aballard@gmail.com> wrote:
>
> > In addition to the added time, aren't there any problems with race
> > conditions if two users try to create a file at the same time and each
> > user's script tries to clean the same files at the same time?

>
>
> ergo, the need to name the files differently; or provide a separate
> namespace, such as a per-user sub-directory.


Do you want to play around with a quick demo account? I can set
you up with temporary access to SSH and the web if you want to see
what we're talking about.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 16h13   #45
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 8:07 AM, Daniel Brown <parasane@gmail.com> wrote:

> On Wed, Apr 16, 2008 at 9:59 AM, Nathan Nobbe <quickshiftin@gmail.com>
> wrote:
> >
> > well since i dont have your service dan, im filling in blanks over here;
> > but, do users get to determine the name of the files that get created by
> > this script, or at least rename them; that could be very beneficial.

>
> Invalid. You went from a statement, to the posing of a question,
> to a semi-colonic (pardon the pun!) statement again. :-D



sounds like ur better at english than i; but then again i was always waiting
for the spell checkers to get decent when i was a kid so i could just let
them handle it for me. laziness.

In any case, yes: the filename can be determined by the user at
> the time of the function call. And the file can be renamed, as well;
> it's placed wherever the user specifies (provided he or she has
> subsequent permission to write to the location, of course).
>


sounds good.

> run on sentence #2 ;D


You are the weakest link. Goodbye!


have your bitter posting days started early ? :P


-nathan

  Réponse avec citation
Vieux 16/04/2008, 16h13   #46
Andrew Ballard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 10:05 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> On Wed, Apr 16, 2008 at 7:59 AM, Andrew Ballard <aballard@gmail.com> wrote:
>
> > In addition to the added time, aren't there any problems with race
> > conditions if two users try to create a file at the same time and each
> > user's script tries to clean the same files at the same time?

>
> ergo, the need to name the files differently; or provide a separate
> namespace, such as a per-user sub-directory.
>
> -nathan
>


It's a start, but what about a user who never returns? You still want
some way to clean out those old files, and I think that's the approach
Thiago was presenting by purging all files older than X
days/hours/minutes. Such a script would have to scan the entire space
regardless of "namespace." I think this points us toward cron rather
than potentially having two simultaneous client processes both looping
through the same directory trying to delete files.

Andrew
  Réponse avec citation
Vieux 16/04/2008, 16h14   #47
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 8:12 AM, Daniel Brown <parasane@gmail.com> wrote:

> On Wed, Apr 16, 2008 at 10:05 AM, Nathan Nobbe <quickshiftin@gmail.com>
> wrote:
> > On Wed, Apr 16, 2008 at 7:59 AM, Andrew Ballard <aballard@gmail.com>

> wrote:
> >
> > > In addition to the added time, aren't there any problems with race
> > > conditions if two users try to create a file at the same time and

> each
> > > user's script tries to clean the same files at the same time?

> >
> >
> > ergo, the need to name the files differently; or provide a separate
> > namespace, such as a per-user sub-directory.

>
> Do you want to play around with a quick demo account? I can set
> you up with temporary access to SSH and the web if you want to see
> what we're talking about.



sure, why not; but ill not let you lure me into a full hosting deal. ive
got my own systems, atm.

-nathan

  Réponse avec citation
Vieux 16/04/2008, 16h14   #48
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 10:13 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> On Wed, Apr 16, 2008 at 8:07 AM, Daniel Brown <parasane@gmail.com> wrote:
>
> > You are the weakest link. Goodbye!

>
> have your bitter posting days started early ? :P


No, but that annoying woman's face and voice popped into my head,
so I thought I'd share.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 16/04/2008, 16h15   #49
Nathan Nobbe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 8:14 AM, Daniel Brown <parasane@gmail.com> wrote:

> On Wed, Apr 16, 2008 at 10:13 AM, Nathan Nobbe <quickshiftin@gmail.com>
> wrote:
> > On Wed, Apr 16, 2008 at 8:07 AM, Daniel Brown <parasane@gmail.com>

> wrote:
> >
> > > You are the weakest link. Goodbye!

> >
> > have your bitter posting days started early ? :P

>
> No, but that annoying woman's face and voice popped into my head,
> so I thought I'd share.



awesome.

-nathan

  Réponse avec citation
Vieux 16/04/2008, 16h17   #50
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] PHP Speech

On Wed, Apr 16, 2008 at 10:14 AM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
>
> sure, why not; but ill not let you lure me into a full hosting deal. ive
> got my own systems, atm.


Congratulations!

I'm not trying to sell you on anything, just thought you might
like to have more of an idea as to what we're discussing. So there!
;-P

I'll send the details to you off-list in a few moments.

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Réponse


Outils de la discussion