[PHP] OT - HTML Terminal ?

2004-09-26 Thread Dave Restall - System Administrator,,,
Hi,

this is severely off topic so please feel free to ignore it :-)

I have an intranet application that currently is accessed using a
browser, no problems there, however I have been asked if I can get rid
of the browser so that the user's are not encouraged to surf so readily.
I initially thought simple - start the browser with the correct home page
as a command line argument and turn off all the tool bars etc. so that it
looks like an xterm (dos window) and of course they can only then click
on the links we provide.  It's not meant to be foolproof and a dedicated
hacker could circumvent the system, however most users won't bother.

I don't particularly want to go the F11 (full screen) route and would
like something easy to install if possible, e.g. a single .exe, Lynx
seemed a good point to start but I think that would freak out just about
all the end users :-)

Does anybody have any POLITE suggestions or any experience of something
similar and can let me in on the secret ?

I have tried google, mozilla  m$ the nearest I have come so far is IEAK.

TTFN,


Dave
php/2004-09-26.tx  php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I have learned To spell hors d'oeuvres Which still grates on Some  |
| people's n'oeuvres.|
| -- Warren Knox |
++

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



Re: RE: [PHP] convert degrees to heading

2004-09-15 Thread Dave Restall - System Administrator,,,
Hi Trevor,

 Very nice solution, Dave.   I like simple, elegant and effective
 solutions like this.  I was wracking my brain yesterday to come up with
 something like this, but my brain wasn't working. Hah.  Good job!

Thanks for the compliments - my head is now a bit bigger :-)

I thought 0 degrees should have been east but thought you were using
a southern hemisphere compass :-)  Anyway, I went back and checked the
original post :-

  I have to write a little function to convert a direction=20
 from degrees
  to a compass -type heading. 0 =3D West. 90 =3D North. E.g.:
=20
 Something like this... it'll account for 360 degrees, too.=20
 No different=20
 that a bunch of IF statements, though...

which is what I coded for - which only goes to prove that the system
will only be as good as the specification :-)

Regards,


Dave
php/trevor-2004-09-15.tx   [EMAIL PROTECTED]
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| The last person that quit or was fired will be held responsible for|
| everything that goes wrong -- until the next person quits or is fired. |
++

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



Re: [PHP] convert degrees to heading

2004-09-14 Thread Dave Restall - System Administrator,,,
Hi,

Alternatively, try :-

$Compass = array('West', 'North Westerly', 'North', 'North Easterly',
'East', 'South Easterly', 'South',
'South Westerly');

print $Compass[round($Degrees / 45)] . \n;

This can be expanded easily by adding 'North North West' etc. at the
relevant points in the array and changing the 45 to 22.5.

No messy horrible switches :-)


TTFN,


Dave
php/2004-09-14.tx  [EMAIL PROTECTED],
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| One picture is worth more than ten thousand words. |
| -- Chinese proverb |
++

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



Re: [PHP] convert degrees to heading

2004-09-14 Thread Dave Restall - System Administrator,,,
Hi,

 Alternatively, try :-
 
 $Compass = array('West', 'North Westerly', 'North', 'North Easterly',
   'East', 'South Easterly', 'South',
   'South Westerly');
 
 print $Compass[round($Degrees / 45)] . \n;
 
 This can be expanded easily by adding 'North North West' etc. at the
 relevant points in the array and changing the 45 to 22.5.
 
 No messy horrible switches :-)

Oh and I forgot to mention, it also deals fairly well with weird degrees
such as 48.7.

Dave
php/2004-09-14.2.tx[EMAIL PROTECTED],
   php-general,[EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| Azh nazg durbatal^uk, azh nazg gimbatul, Azh nazg thrakatal^uk agh   |
| burzum ishi krimpatul! |
| -- J. R. R. Tolkien|
++

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



Re: [PHP] Is a PECL a black whole?

2004-09-03 Thread Dave Restall - System Administrator,,,

 It took me a while to find an explanation of what a PECL is. I kept reading 
 comments about things being moved to a PECL but I saw nothing about what is 
 in a PECL or how to get anything out of a (the?) PECL. As far as I knew, 
 there is a danger of all of PHP being in a PECL.
 
 I could not (and cannot) find an explanation of a PECL when I start by going 
 to the main php.net page and looking for one. So I searched for PECL and 
 got a few results; one result is for vpopmail:

Welcome to the club.  I sent a similar email about this a few days ago
and nobody replied.  I was looking for documentation on the fileinfo PECL
module which is recommended instead of mime_content_type, simple stuff like
what arguments does it take etc.  There is also a lack of documentation
for how to install and run and USE PECL modules which is worrying
especially if as you say a lot of PHP is going down the PECL path.

To me PECL looks like a major own goal.

Cue the flames for this being a PHP list and not a PECL list.

TTFN


Dave
php/2004-09-03.tx  [EMAIL PROTECTED]
   php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I don't want people to love me.  It makes for obligations. |
| -- Jean Anouilh|
++

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



[PHP] Mime type and PECL::Fileinfo.

2004-08-29 Thread Dave Restall - System Administrator,,,
Hi,

PHP 4.3.8, Apache 1.3.31, Debian/GNU Linux

Is anybody using PECL extensions ?  I want to let people upload data to a
site I'm building and want to avoid using mime_content_type because from
the manual :-

This extension has been deprecated as the PECL extension fileinfo
provides the same functionality (and more) in a much cleaner way.

After much messing about I eventually managed to work out how to install
the package :-

download Fileinfo from pecl.php.net
pear install ./Fileinfo

I had to install the magic library, libtools etc. before this would work.

My question now is, how do I call the fileinfo function and where do I
find any sensible documentation on it and what does it return ?

Currently, I'm downloading and installing the XML2 libs so I can install
php5 to see if it works any better :-(

This has to be the worst experience I have had with PHP, there just
seems to be no documentation on PECL aimed at an end user.

Regards,


Dave
php/2004-08-30.tx  php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. 0845 10 80 151Mob. +44 (0) 7973 831245   Int. +44 (0) 1287 653003 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| When you dig another out of trouble, you've got a place to bury your own.  |
++

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



Re: [PHP] looking for php talent...

2004-03-05 Thread Dave Restall - System Administrator,,,
Hi,

 we're looking for some PHP development talent. however, we don't want to
 post here if this is not the right group/list. please let us know if it
 is/isn't appropriate to post our requirements. if it is, we'll go ahead and
 post what we're looking for.

There seem to be a few lists available that cater for PHP jobs, has
anybody any experience of them ?  Is there a need for another one ?
If so, how should it be run ?

Let me know (preferably off list to cut down the OT stuff).

Regards,


Dave
mail/php/2004-03-05.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| PENGUINICITY!! |
++

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



[PHP] Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.

2003-10-02 Thread Dave Restall - System Administrator
Hi,

not sure if this is the right place to ask but does anybody have any ideas
how long it will be before PHP/Apache 2 is considered stable enough to be
used in a production environment ?.  I set up a test box with them both on
nearly a year ago and the online documentation still cautions against use.

Are the problems with Apache or are they with PHP or is it a bit of both ?
Will PHP5 be any better ?

Regards,


Dave
mail/php/2003-10-01.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I cannot conceive that anybody will require multiplications at the rate|
| of 40,000 or even 4,000 per hour ...   |
| -- F. H. Wales (1936)  |
++

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



RE: [PHP] If you ever had a Vic20

2003-08-15 Thread Dave Restall - System Administrator
Hi,

   $found =3D 0;
   while ($mydata =3D mysql_fetch_object($news))
   {
   if ($mydata-StudentId =3D=3D $StudentId)
   {$found =3D 1;  break;}
   }
 
   if ($found=3D=3D1){do this}else{do that}

Why not re-oganise your SQL statement so it only returns the required data ?.

select * from table where StudentID = $StudentID;

if (mysql_num_rows() == 1)
do this;
else
do that;

Vic 20's were for wimps ;-)

TTFN


Dave
mail/php/2003-08-15.tx [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| I owe the public nothing.  |
| -- J.P. Morgan |
++


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



[PHP] Is there an RTFM for 'use strict' ?

2003-06-23 Thread Dave Restall - System Administrator
Hi,

Done a lot of Perl  PHP coding over the years and one thing I _really_
liked about Perl is its 'use strict;' directive.  For those of you not
familiar with Perl, this made the script die if you don't (among other
things) declare your variables before using them.

Once the fingers are flying, stupid typing mistakes often come in and
it is more often when a variable name is being typed.  It would be
interesting to see how many PHP coders out there have spent ages trying
to find a bug in their code that was due to them mis-spelling a variable
or method name.

Anyway, I can't find a reference to anything in the manual that will
force PHP to strictly check variable names etc. to see if they are
declared before use and if not throw up an error.

Can somebody tell me which M to FR ?

Regards,


Dave
mail/php/2003-06-23.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| No man's ambition has a right to stand in the way of performing a simple   |
| act of justice.|
| -- John Altgeld|
++


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