[PHP] How to calculate my local time?

2004-02-17 Thread Hamid Hossain
Hi,

My local time zone is GMT+3

My website is located in a remote server with different time zone.

So, How to calculate my time zone using the GMT functions in PHP?

Regards,
Hamid Hossain
---
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


[PHP] Arranging My Functions

2004-02-14 Thread Hamid Hossain
Hi,

I've created a big site contains about 500 functions to handle all the site 
logic. I saved all these functions in one file.

- Should I separate them into grouped files ?
- Is there any reference on the web on how to arrange my PHP code?
Regards,
Hamid Hossain
---
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
---
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] Re: sql query question

2004-02-12 Thread Hamid Hossain
Hi,

It is better to use FullText. Convert the description field to FullText. You 
will gain a powerfull control in this case. For more information on how to 
use FullText read a little-bit in the MySql manual (MATCH AGAINST) commands.

Regards,
Hamid Hossain
---
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
Original Message Follows
From: Ben Ramsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED], tony [EMAIL PROTECTED]
Subject: [PHP] Re: sql query question
Date: Thu, 12 Feb 2004 16:05:16 -0500
This is a SQL question, rather than a PHP question, so I would suggest doing 
a google search on SQL tutorials, but I think what you are trying to do 
would work like this:

SELECT * FROM table WHERE descript LIKE '%new%' OR descript LIKE '%car%'



Tony wrote:

hi

if i have  new  car and i want to search
each word in description
can i do
SELECT * FROM table WHERE
descript = new OR descript =car??
any help is appreciated
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


[PHP] reading remote page content

2004-02-10 Thread Hamid Hossain
I wants to read some pages throug http call. Then, I am going to parse the 
returned string and do some process.

For example: I want to get the latest news from CNN.com daily. So, I want to 
call http://www.cnn.com and retrieve CNN's homepage content in a variable as 
a string. After that, I will apply some RegExp to extract what I want.

Regards,
Hamid Hossain
---
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] mysql functions

2004-02-10 Thread Hamid Hossain
Use mysql_result and u can use mysql_fetch_object, mysql_fetch_array also.

The following example will show u how to do it with mysql_result which will 
retrive one row only.

From PHP Manual:
?php
   $link = mysql_connect(localhost, mysql_user, mysql_password)
   or die(Could not connect:  . mysql_error());
   $result = mysql_query(SELECT name FROM work.employee)
   or die(Could not query: . mysql_error());
   echo mysql_result($result,0); // outputs first employee's name

   mysql_close($link);
?
Regards,
Hamid Hossain
---
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
Original Message Follows
From: Angelo Zanetti [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Subject: [PHP] mysql functions
Date: Tue, 10 Feb 2004 11:44:47 +0200
I have a query which returns only 1 row, which of the following would be the
best to get the value from the resultset:
mysql_result()
mysql_fetch_field()
mysql_fetch_row()
the resultset only returns 1 column, so basically its only 1 field i get
from the resultset.
thanx in advance.
angelo

Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


[PHP] PHP code encryption

2004-02-03 Thread Hamid Hossain
Hi,

I am working in a project for a customer of my company, I am using PHP and I 
want to prevent my customer from touching my code.

The problem that I have to install the application in the customer computer. 
So, I am looking for a way to encrypt my PHP code.

I heard that there is a way but I don't have details. How to do this? Is it 
legal to be used in a commercial purposes? Is it free? Should I install 
somthing in the customer's pc to decrypt my code? Could I have some not 
encrypted pages (eg: config.php) ?

Thanks,
Hamid Hossain
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


[PHP] Writing CRON jobs!

2004-01-27 Thread Hamid Hossain
Is there any good reference on how to use CRON (I mean on the net)?

I need to fire some PHP pages at scheduled time daily or weekly, ... so on.

Regards,
Hamid
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


RE: [PHP] what PHP really needs

2004-01-23 Thread Hamid Hossain
As a ColdFusion Certified Developer I can say: You are right!

In CF you can fire a sql statment and store its result in a variable which 
is not going to be removed from the server's memory after responding to the 
user. That variable will be available for sometime declared by you when you 
created the query.

This is usefull, suppose you want to show the last 20 recoreds added to your 
site, you will fire the query once per hour! So, if your site visitors are 
1000 per hour, your transaction to the actual db will be 1 time per hour not 
1000 per hour.

Sounds Greate!

That also has a drawback, you have to be smart enough. You should use this 
feature only if your query is fixed and it should return some limited value. 
For example, you cannot store your search results because each and every 
visitor will use his own key words.

Regards,
Hamid Hossain
Saudi Arabia
Original Message Follows
From: PHP general [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] what PHP really needs
Date: Fri, 23 Jan 2004 20:42:59 +0100
There's 1 really important thing missing in PHP as I see it, and it's the
ability to keep variables in memory for as long as
the programmer choose. If this was possible there could be some truly great
optimizations done. Some things are very
slow to create but very fast to work with. I wrote a XML class a couple of
days ago and while it's extremly quick to
search and work with, sadly it's rendered pretty much useless since creating
the tree which it uses isn't fast enough.
I've heard there's a feature like this in Cold Fusion, which every Cold
Fusion user seems to think of  as the holy grail,
and I would have to agree with them.
One thing I've heard they use this for is to load an entire database into
system memory. I don't know exactly how it's
works but imagine having the whole database in system memory. When you
change data you update it both in system
memory and on the drive, but when you select (which is what you mostly do),
you just query the mirror in system memory.
So how cost effective could this be? 1GB of system memory is pretty much
minimum on a decent server today.
Assuming the site generates aprox 1 million bytes worth of data every day
(storing images and other types of massive data
in the tables would perhaps not be apropiate) the site could be up and
runing for 1 thousand days. And if you just keep
tables that gets queried a lot, but doesn't get altered often, you could
most likely come up with a great compromise.
I can't say for sure how much faster things would be but I'm guessing at
several 1000% faster, however I might be way off.
The only drawback I can see is that there might be multi threading issues,
so if this would be implemented a new key word
would probably have to be introduced to make data mutexed, or perhaps the
other way around to avoid to many people
scratching their heads.
/Sebastian Karlsson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


[PHP] Using templates (Code User Interface)

2004-01-23 Thread Hamid Hossain
Hi,

Always I have a problem that I don't know how to make my code away from the 
user interface files.

I tried to use some template classes, but I did'nt like what I tired because 
some if statments are used inside the template.

How can I prepare my code to be working in more that one template? Should I 
use some methodology like FuseBox.org

Regards,
Hamid Hossain
_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

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


[PHP] Showing local date time

2004-01-22 Thread Hamid Hossain
Hi all,

I am new member to the list, let's see ;)

I am hosting my site in a shared hosting plan in US while I am in Saudi
Arabia. I want to show the current datetime at my local. Should I use
setlocale()? I mean is there a way which will give me the local datetime
without calculating the difference manually?

Suppose that I want to show the local datetime to my site visitors locals.
That means if my visitor is coming from France, I have to show him France
datetime. I he is coming form England, I should show his local also.

Any suggestion will be appreciated.
Hamid Hossain

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