You are here: Re: window.setTimeout equivalent in PHP? « PHP Programming Language « IT news, forums, messages
Re: window.setTimeout equivalent in PHP?

Posted by shimmyshack on 09/03/07 15:57

On Sep 3, 3:55 pm, Csaba Gabor <dans...@gmail.com> wrote:
> On Sep 3, 3:14 pm, shimmyshack <matt.fa...@gmail.com> wrote:
>
>
>
>
>
> > On Sep 3, 2:00 pm, Michael Fesser <neti...@gmx.de> wrote:
>
> > > .oO(Jerry Stuckle)
>
> > > >OK, you're using the wrong tool for this. PHP is server side, not
> > > >client side, and has no idea what happens at the client.
> > > Csaba wrote:
>
> > > | My question was about CLI PHP (Command Line Interface or CLIent side
> > > | php), and not server side processing.
>
> > > Micha
>
> > Cant you just fire the navigate() method, then sleep for $timeoutTime
> > and then execute onDocumentComplete or similar, assume that if it
> > doesn't return true that you are safe to fire an error.
>
> Thanks, this is a great suggestion.
>
> > However you
> > recognise that even IE cant tell you whether all the frames in a page
> > have loaded, and what does onDocumentComplete mean for some remote but
> > unessential elements - adverts say..
>
> This is a good point, but I believe I am aware of the relevant issues
> (including the difficulty of associating frames with their
> containers). Actually, downloadComplete is the event that I key on.
> For example, hit that back button on IE and documentComplete does not
> fire, whereas downloadComplete does. However, downloadComplete is
> exceptionally poorly designed since all you get back is the IE object,
> and not even a handle to the window in question. Nevertheless, for a
> situation where I only need access to the top level DOM,
> downloadComplete (with $ie->readyState >= 3) suffices.
>
> > I'm not at all sure that you
> > should be writing this part in PHP, rather and perhaps more stably
> > use .NET and expose a COM interface for php to call bespoke methods...
>
> >http://msdn2.microsoft.com/en-us/library/aa768329.aspx
>
> My objections against .NET are
> (1) Bloat - the thing is huge, last time I looked, not to mention that
> my Win XP configuration needed to change simply as a result of
> installing it.
> (2) Stability - When I go to Microsoft's web site to download it (OK,
> I haven't checked in well over a year) and see zillions of versions,
> that is major red flag territory telling me that it's still
> effectively a beta product. When I see an unambiguous -> use this
> version <- I'll know there's some semblance of stability. Perhaps
> it's already happened?
> (3) Difficulty of use - I've occasionally seen newsgroup rambling of
> how something that is simple with .COM is tortuous with .NET (sorry,
> this is just hearsay since I can't recall any specifics, and it is
> also old news)
> (4) No compelling reason - Nobody has been able to explain to me what
> advantage it would offer to me (I.e. what can I not do with COM that I
> would want to do with .NET)- Hide quoted text -
>
> - Show quoted text -

I see, I have to say some of the .NET stuff feels more native and
there are great sites like codeproject.com to help out.
I once made a php script to navigate ie, so I could "follow" my users
around one of my sites, and see what they did, there was a javascript
in the head that just sent the users actions back to my home server
where a php script listened, and automated IE, I used it for a while
and then got tired of the weird syntax of php+COM.
It's great though using php's activescripting to do useful tasks on
windows, have you checked out windows powershell though, which offers
power (through .NTE and COM) but also ease of use - with alot of
cmdlets (built in functions) and user cmdlets to download and share.
It's the perfect lightweight tool to automate stuff, like AutoIT3 but
in a shell, without needing to have the user install PHP - which alot
of admins are suspicious of - for instance I use powershell at work
where windows abounds, but php activescripting at home, but powershell
does feel nice - although I'm not master at it yet. my $0.02

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация