Re: Questions
| From: | CPT John W. Holmes | Date: | Mon, 07 Apr 2003 18:06:10 +0000 |
| Subject: | Re: Questions | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142731@lists.php.net to get a copy of this message | ||
As for the error handler, yes you have to define it in every script,
otherwise you get the default. It's easy to put your handler in a separate
file, though, and just include() it into any project you have.
Check out a phpinfo() page and there are some variables coming from the
browser that can give you an idea what langauge to use. Be prepared to offer
a default, however, as you're relying on the browser to send this data,
which doesn't always happen.
As for encryption, check out the mcrypt section of the manual.
---John Holmes...
PS: Sorry for the quoting, but for some reason your email message wasn't
appended with > when I replied to it.
----- Original Message -----
From: "Mario Soto" <mario_s@amigo.net.gt>
To: <holmes072000@charter.net>; "php general" <php-general@lists.php.net>
Sent: Monday, April 07, 2003 12:25 AM
Subject: Re: [PHP] Questions
Other. I hope none are, or sounds like a newie question. (Not saying
anything bad to the newies, we were one at one time in our lifes)
Thank you. Ok some questions are anwered. I will set my developer server on
my machine. I'm using Win98SE for developing work. It's a very good idea and
now I have to find out how will I do that. How ever I get the answer of a
person about sites. Is on the mailing list. I'll check it.
I've checked the set_error_handler(), and I like it. The thing is the
follow. I have to include he same code for every script I build, or call the
script from other script. This is not a problem but this is another question
to avoid calling always the script. When is not defined a new error handler,
the program uses its own handler. Is there a way to susbstitute that handler
and set my handler, or a generic error page without have to call it from any
builded script?
I know is trickie to use the user option to chose the prefered language from
the visitors system. This site I'm building is to be set for people from
different countries in Europe (I won't do all the translations) for diferent
languages. Of course I'll use cookies, but for the first visit, the visitor
have to receive a welcome in its own language (as described on the
specifications for the site, and very requested from the director of the
foundation). It will have other language options of course in another way,
and will avoid (in some cases) the use of splash pages.
This really sounds as a newie comment, but I guessed that the md5 were a two
way encription.
Does somebody know a secure two way string encryption? (and were to get it)
If you use any Yahoo! authentication form (specialy mail or geocities), then
you can check on your browser's cache for a .js file. One of them contains a
implementation for the md5 encryption based on JavaScript. A friend sended
to me the file yesterday. (Sorry for this out topic, but it were a part of
my first question.)
I'll check the archive of this list. [ :-) ]
Thanks to every body to read, and again, I apologize for not disable the
request for recepit on my messages. This wont happend again from me.
Mario Soto
mario_s@amigo.net.gt
-.-.-.-
----- Original Message -----
From: John W. Holmes
To: 'Mario Soto' ; php-general@lists.php.net
Sent: Friday, April 04, 2003 4:26 PM
Subject: RE: [PHP] Questions
> 1) Does somebody know were to find a free server that supports php to make
I don't know of any off hand, but I know they exist. A search on google
will turn up some. Why not just set up a development server on your own
machine, though? Apache and PHP are free and simple to set up (depending
upon your OS), so you can test everything before you even upload it.
> 2) Does somebody know how to get the error string, in the case of one
Take a look at the set_error_handler() function.
www.php.net/set_error_handler You can trap the errors with that and then
apply any translation you need. Gettext may be of some use here, but
I've never used it. www.php.net/get_text
> 3) It must be a way to known the prefered language to show a page (eg. ES,
This one is tricky because you're relying on something from the client
side. You don't know if it's correct or not. The best option is to just
offer them a simple drop down to choose their language and then remember
it for them (with a cookie) after that point.
> 4) Does somebody know about the md5 encryption algorithm? (I want to know
MD5() creates a 32 character hash of a string. There is no way to get
the original string or password back. You must use md5() on the password
that the user supplies and compare that to the md5() values you have
stored. There is an md5() implementation within JavaScript that I've
heard about.
> By the way I joined the list the 2nd day of march (about the 22 GMT), and
Welcome to the list. There is an archive that you can search.
http://marc.theaimsgroup.com/?l=php-general
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php