[PHP] Re: Help me out plzzzz

2003-03-09 Thread Lord Loh.
You can't do it from java script...

See the php docs...there are good examples too.

Hope this helps.

Lord Loh.



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



[PHP] timestamp to english

2003-03-09 Thread Lord Loh.
How do I convert the unix time stamp (the one I get by the time()) to a
readable English language time

I am getting data from mySQL by the "now()" function

Please Help
Thank You.

Lord Loh.



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



[PHP] Re: Memory used by script...

2003-02-24 Thread Lord Loh.
Your scripts must be very large...make the codes comming in the if block in
another file and include it(use your descretion). The less often excuted
code is better off as include files...

And use 'require' only when required.

Lord Loh



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



[PHP] Re: cookie problem..

2003-02-22 Thread Lord Loh.
Cookies are loaded the next time the page is loaded. So you may have to
refresh the page to see the cookie...

or

Submit to a html page which will redirect to the page which shows cookie
value...

Hope this helps...This should work...

Lord Loh



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



[PHP] Re: passing variables to flash

2003-02-21 Thread Lord Loh.
See the flash docs. There are ways of making javascript and flash interact.
So make a dynamically generated javascript which will pass variable to
flash!

Or are there special reasonds to use only GET ?

Lord Loh.



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



[PHP] Re: Cannot add header information

2003-02-19 Thread Lord Loh.
Guys, Guys, why are you harrasing this poor chap?

one sure simple way is..
at the begining

Throws out all the buffered output to the browser at the other end.

now add header info any place before ob_end_flush(); and get no errors !!!

Lord Loh



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




[PHP] Re: register_globals On

2003-02-19 Thread Lord Loh.
An alternative...

1. register_globals off

use the command
import_request_variables("PC","_p");
now you can get the variables like user as $p_user.
The get variables will be ignored!

Still, If a user developes a special browser, exclusively to hack, he may be
able to send post variables...

Any comments...Any one ?

Lord Loh




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




Re: [PHP] long running PHP application

2003-02-19 Thread Lord Loh.
Is there any conflict with the server Keep-Alice time ?
That is usually not more than a minute...

Thank You
Lord Loh



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




Re: [PHP] long running PHP application

2003-02-17 Thread Lord Loh.
There is a execution time out(30 sec. by default)

How do you avert it!



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




[PHP] Re: Default argument values

2003-02-17 Thread Lord Loh.
So you want to do overloading ?

Try depricating the function call by
@blhablah($a,$b,[$c]);
No warnings generated!

Hope this helps

Lord Loh



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




[PHP] Re: Search engine PHP

2003-02-17 Thread Lord Loh.
See mine...
MySQL, PHP

http://findmaan.sourceforge.net/ opensource, So you can modify as long as
you give me the cridits and comply with the licence...

Lord Loh



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




[PHP] Re: loading same page

2003-02-16 Thread Lord Loh.
Thy these headers
=
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: ' . $now);
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Pragma: no-cache');
=

Hope it helps...

Lord Loh



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




[PHP] Re: PHP error messages

2003-02-16 Thread Lord Loh.
That is not an error! It is a Warning...I got it the other day when the file
was empty (or did not exist or something).

Use @ prefix to make it disappear

http://www.something.com/the_filename.txt";);
?>

Hope this helps...

Lord Loh.



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




[PHP] Re: Converting a large number of passwords to MD5 at once.

2003-02-16 Thread Lord Loh.
Simple!
Write a script to automate the process!

Lord Loh



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




[PHP] Future compatibility

2003-02-16 Thread Lord Loh.
Future compatibility
===

Php and zend have constantly been discarding old syntax...making it
deprecated and all...

How can I be sure that a code I write will run for ever (or at least 10
years) irrespective of future PHP versions...

Is there a list of syntax that php plans to discard...

for example(only example): The DBX library I have is giving warnings with
mysql...

Please help

Thank You!
Lord Loh



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




[PHP] Regex Help

2003-02-10 Thread Lord Loh.
I am new to regex and broke my head on it the other day...in vain...

Can any one tell me a place to get a step by step tutorial on it or help me
out on how to work it out ?

I am trying to make a link collector.

after opening the desired page, I want to get all the hyperlinks on it...

Thank You!
==
~ Lord Loh ~
==



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




Re: [PHP] Win PHP Editor...

2002-08-11 Thread Lord Loh.

www.phpide.de

An excellent PHP IDE for windows. Color coding, Syntax hints(tool tips
type), auto indent etc...

Lord Loh.



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




[PHP] My SQL speed.

2002-08-02 Thread Lord Loh.

I have a database of mysql with 3 million records. No query is performed in
less than 10 seconds!(With Index and all that)

Any way to speed this up ?

How on earth does US Social Security dept. maintain so many records ?
Google has 1 billion pages and qurys in a few milliseconds...

I am not saying that they are using MySQL!

Should this be asked in a mysql list ? Please suggest a NNTP server!

Lord Loh.



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




[PHP] File Phrasing & Mark-ups

2002-08-02 Thread Lord Loh.

A function I have written to accept filenames, read it and phrase it's mark
ups. Is the second function of one line file a good idea ? Is there an
alternative ? Can problems arise if the size of the file being phrased is
very large ?
==

=



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




[PHP] Re: Question about sessions

2002-08-02 Thread Lord Loh.

>From the php docs(XC. Session handling functions)
==


Hello visitor, you have seen this page  times.;

 is necessary to preserve the session id
# in the case that the user has disabled cookies
?>

To continue, click here
===




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




[PHP] Re: include()

2002-08-02 Thread Lord Loh.

How ever can ant of the apache restrictions stop any one from including the
script by giving the whole path.

ie /home/htdocs/include.inc or /home/abc/include.inc

Yes or No ?
I use win 2000 so it is not possible for me to experiment! but I have
hostings on servers like www.f2s.net and a project on www.sourceforge.net

If you are familiar with these systems, what do you comment?

Lord Loh.



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




Re: [PHP] include()

2002-07-31 Thread Lord Loh.

"Other users on the same server *shouldn't* be able to include() in this
way"

How?

Would their $_SERVER['HTTP_HOST'] not be the same?



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




[PHP] Re: passing variable via url ( newbye question)

2002-07-31 Thread Lord Loh.

 http://myadress/php/mypage.php?modo=123&color=red&size=3
and to get
echo $_GET['modo']."";
echo $saci_color."";
echo $saci_size."";
===
Tested it! It worked!
G stands for GET
You can use P or C for POST or COOKIE
The order of gpc is important the later overwites the former...see
docs(XCVIII. Variable Functions)



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




[PHP] include()

2002-07-31 Thread Lord Loh.

I suppose include() can be used to include files from remote systems(not on
WINDOWS).

So, How can I protect my script from unauthorised inclusions ?

A webmaster on the same server can always use a path like
"/home/htdocs/.../config.php" and include my config .php which contains my
database password !!

Even a web master from a remote server can do the same by probably using
http://www.xyz.net/config.php

I am using windows 2000/apache/php so I really have not tried these...but
the docs say it can be done(remote system inclusion except on win)

Lord Loh.



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




[PHP] toolbar.google.com

2002-07-31 Thread Lord Loh.

Google uses php to make a software download and installs it through the
browser!

How does this work ?

Lord Loh.



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




[PHP] Re: passing variable via url ( newbye question)

2002-07-30 Thread Lord Loh.

http://myadress/php/mypage.php?modo=123&color=red&size=3

is fine!

you can now use these variables like
$modo $color and $size;

Why bother with $_GET['modo']; ?




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




[PHP] What is REGEX ?

2002-07-29 Thread Lord Loh.

Hello! I am new to REGEX.
I tried to read several posts on REGEX. However none were descriptive.

What is Regex ?
Is it a part of the php? or an additional module?
What can it be used for ?

Please let me know
Thank you.

Lord Loh.



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




[PHP] Re: adding Databases

2002-07-26 Thread Lord Loh.

MySQL support is now built in Php. So all you have to do is start using
it...

Any problems try editing the php.ini to give a little extra conguration for
mySQL..

Lord Loh.



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




[PHP] Re: Sessions don't work?

2002-07-24 Thread Lord Loh.

>From the PHP docs...
=


Hello visitor, you have seen this page  times.;

 is necessary to preserve the session id
# in the case that the user has disabled cookies
?>

To continue, click here




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




[PHP] Images of GD Library

2002-07-21 Thread Lord Loh.

1. How can I store an image in a database.. ?
2. How can this be now used to create an image ?
3. Is there any way I can read an image from a remote site and save it's
minature view in my DB / file ? (How can an image be resized ?)




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




[PHP] Re: Development Tools

2002-07-14 Thread Lord Loh.

www.phpide.de

Check this out - Php IDE

Lord Loh.





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




[PHP] Re: Editing files by line

2002-07-11 Thread Lord Loh.

int fseek (int fp, int offset [, int whence])

int ftell (int fp)

int rewind (int fp)

These syntaxes might be useful...
Read more in File System Functions of the PHP Docs.

Hope these help

Lord Loh.



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




[PHP] Hiding submitted variable-Solution

2002-07-09 Thread Lord Loh.
, x[i+ 3], 10, -1894986606);
c = ii(c, d, a, b, x[i+10], 15, -1051523);
b = ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
d = ii(d, a, b, c, x[i+15], 10, -30611744);
c = ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = ii(b, c, d, a, x[i+13], 21,  1309151649);
a = ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = ii(d, a, b, c, x[i+11], 10, -1120210379);
c = ii(c, d, a, b, x[i+ 2], 15,  718787259);
b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
  }
  return rhex(a) + rhex(b) + rhex(c) + rhex(d);
}


== Bogus Function 
function bogus(strng)
{
   var returnstr="";
   for(i=1;i<=strng.length;i++)
  {
 returnstr=returnstr+"*";
  }
   return returnstr;
}
=

==A sample web Page==

.
.



Username
Password


.
.

=
the bogus function here creates a bogus value tor the 'typedpw' so that the
user would not get confused by the sudden change in the password length.

If skipped,
- the real password is still posted (security breach)
- If a special hidden field is not used, then the password length suddenly
increases.

Disadvantage
- If the user clicks the submit button twice, then the password submitted
will be incorrect as it would
be MD5(MD5(password))!
So to come over it,



I dont know if it is compatable with other browsers...

Lord Loh



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




[PHP] Hiding submitted variable values in location bar of browser !

2002-07-09 Thread Lord Loh.
, x[i+ 3], 10, -1894986606);
c = ii(c, d, a, b, x[i+10], 15, -1051523);
b = ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
d = ii(d, a, b, c, x[i+15], 10, -30611744);
c = ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = ii(b, c, d, a, x[i+13], 21,  1309151649);
a = ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = ii(d, a, b, c, x[i+11], 10, -1120210379);
c = ii(c, d, a, b, x[i+ 2], 15,  718787259);
b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
  }
  return rhex(a) + rhex(b) + rhex(c) + rhex(d);
}


== Bogus Function 
function bogus(strng)
{
   var returnstr="";
   for(i=1;i<=strng.length;i++)
  {
 returnstr=returnstr+"*";
  }
   return returnstr;
}
=

==A sample web Page==

.
.



Username
Password


.
.

=
the bogus function here creates a bogus value tor the 'typedpw' so that the
user would not get confused by the sudden change in the password length.

If skipped,
- the real password is still posted (security breach)
- If a special hidden field is not used, then the password length suddenly
increases.

Disadvantage
- If the user clicks the submit button twice, then the password submitted
will be incorrect as it would
be MD5(MD5(password))!
So to come over it,



I dont know if it is compatable with other browsers...

Lord Loh



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




[PHP] Re: Time to Calculate Time

2002-07-08 Thread Lord Loh.

";
$i=0;
do{
$i++;
}while($i<=100);
$stop=getmicrotime();
$difference=($stop-$start)/3600;
echo $start."".$stop."".$difference." Hours";
?>

Does this help...

- Lord Loh



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




[PHP] TEST-PLEASE IGNORE

2002-07-02 Thread Lord Loh.

TEST-PLEASE IGNORE




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