[PHP] imap_search?

2001-08-30 Thread shi

Hello
 I'm trying to use imap_search to retrieve the all the post after a given
date and then put them into a mysql DB. I don't know if this is the best way
to do it.


$searchstr = "SINCE Thu, 30 Aug 2001 12:05:49 +0200";
$search = imap_search($nntp, $searchstr, SE_UID);

This should give me a array of all the post after the date in $searchstr,
but instead it gives me all the posts in the newsgroup.

Is there anyone that can help me?
Thank you

Shimon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] imap?

2001-09-02 Thread shi

I'm using imap_header to get all the headers in a newsgroup on a NNTP-server
like this

if($nntp=imap_open("{sunsite.auc.dk/nntp:119}dk.admin","","";))
{
for($i=1;$i<5;$i++)
{
$header = imap_header($nntp, $i);
echo "MESSAGE ID: " .
HTMLSpecialChars($header->message_id) . "\n";
echo "SUBJECT:" .
$header->Subject . "\n";

   echo "SENDER ADDRESS: " .
HTMLSpecialChars($header->senderaddress) . "\n";
   echo "REPLY-TO: " .
HTMLSpecialChars($header->reply_toaddress) . "\n";
print("DATE: $header->date\n");
echo "REFERENCES: " . HTMLSpecialChars($header->references) .
"\n";
print("XREF: " . $header->xref) . "";
}
}

But I can't get it to write the XREF on the screen. Every thing else works.

I hope that you can help me
Thanks

Shimon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: imap?

2001-09-02 Thread Shi

it still dosen't work

Help

Shimon
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message
00f701c133ef$b52b5200$6401a8c0@Lynchux100">news:00f701c133ef$b52b5200$6401a8c0@Lynchux100...
> You're missing a closing ) on the final print() statement...
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: Shi <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, September 02, 2001 11:01 AM
> Subject: imap?
>
>
> > I'm using imap_header to get all the headers in a newsgroup on a
> NNTP-server
> > like this
> >
> > if($nntp=imap_open("{sunsite.auc.dk/nntp:119}dk.admin","","";))
> > {
> > for($i=1;$i<5;$i++)
> > {
> > $header = imap_header($nntp, $i);
> > echo "MESSAGE ID: " .
> > HTMLSpecialChars($header->message_id) . "\n";
> > echo "SUBJECT:" .
> > $header->Subject . "\n";
> >
> >echo "SENDER ADDRESS: " .
> > HTMLSpecialChars($header->senderaddress) . "\n";
> >echo "REPLY-TO: " .
> > HTMLSpecialChars($header->reply_toaddress) . "\n";
> > print("DATE: $header->date\n");
> > echo "REFERENCES: " . HTMLSpecialChars($header->references)
.
> > "\n";
> > print("XREF: " . $header->xref) . "";
> > }
> > }
> >
> > But I can't get it to write the XREF on the screen. Every thing else
> works.
> >
> > I hope that you can help me
> > Thanks
> >
> > Shimon
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sovket help?

2001-09-24 Thread shi

Hi
I'm trying to listen to port 119 with a socket connection. The script looks
like this:
It works fine until this line "if(($ac=accept_connect($sock))<0){"
Thats where the problem is, it never accepts a connection it just keeps on
running.

";
 echo strerror($bin) . "";
 echo strerror($lis). "";
 if(($ac=accept_connect($sock))<0){
  echo strerror($ac). "";
 }
 else
 {
 $str ='';
 echo $ac;
 $re =read($ac, $str, 1);
 }
 echo strerror($re) . "";
 echo $re . "";
?>

thanks
Shimon







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP 4.1.2 session problem

2003-01-29 Thread Alex Shi
Hi,

I am sure at least I was not a newbie in the topic I am talking about.
But this problem made crazy. I was hoping for a bit of help please.

The problem is: you have to make double correct logins to get into 
the session protected area. Here is the situation:

1. server configuration:
PHP 4.1.2,
Rapidsite/Apa/1.3.26 (Unix),
FrontPage/5.0.2.2510,
mod_ssl/2.8.10,
OpenSSL/0.9.6e 

2. the the login script:


3. in the session protected area, each php file must be added with
following code at very begining:



Again, with the script above, the problem is: you have to make 
double correct logins then you can get into the protected location.

The similar scripts have been used in many different projects but 
only this one get so weird result. So I would prefer to say session 
behaviour on this server is abnormalHowever, I do hope I myself 
made something wrong thus the bug is possible to be fixed...

Thanks for any help in advance!

Alex Shi

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




[PHP] text to image

2003-02-14 Thread Alex Shi
Hello,

I am thinking to create php script to dynamically convert a text string to
image. My questions are:

1. with a given text string, say "hello, world", is it possible to
dynamically
convert it to an image? and what php built-in functions can be utilized?
2. if I want to use true-type verdana font, can I just upload the windows
font file to the web server (linux) and use php to load the font?

Thanks in advance!

Alex Shi



--
==
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==
TrafficBuilder Network:
http://www.bestadv.net/index.cfm?ref=7029
==


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




Re: [PHP] text to image

2003-02-14 Thread Alex Shi
Hi, THanks for your reply.

I search the manual and created following script.



I got following error msg when ran it:


Warning:  ImageTtfText: No TTF support in this PHP build in
/home/dotkard/www/current_time.php on line 6

Warning:  ImageGif: No GIF support in this PHP build in
/home/dotkard/www/current_time.php on line 7

I checked the phpinfo but failed to find which variable I should turn on.

Alex

> Alex,
> Easy to do what you want.  Check out the "image" functions in the php
> manual.  There are some font limitations, specifically dealing with
> alternate characters, but you'll find out what works and what doesn't soon
> enough.
> Hugh
>
> ----- Original Message -
> From: "Alex Shi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 14, 2003 10:16 AM
> Subject: [PHP] text to image
>
>
> > Hello,
> >
> > I am thinking to create php script to dynamically convert a text string
to
> > image. My questions are:
> >
> > 1. with a given text string, say "hello, world", is it possible to
> > dynamically
> > convert it to an image? and what php built-in functions can be utilized?
> > 2. if I want to use true-type verdana font, can I just upload the
windows
> > font file to the web server (linux) and use php to load the font?
> >
> > Thanks in advance!
> >
> > Alex Shi
> >
> >
> >
> > --
> > ==
> > Cell Phone Batteries at 30-50%+ off retail prices!
> > http://www.pocellular.com
> > ==
> > TrafficBuilder Network:
> > http://www.bestadv.net/index.cfm?ref=7029
> > ==
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


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




Re: [PHP] text to image

2003-02-14 Thread Alex Shi
forgot somethingwhen try following script in another server I got
500 internal server error.



Alex again

>
> I got following error msg when ran it:
>
> 
> Warning:  ImageTtfText: No TTF support in this PHP build in
> /home/dotkard/www/current_time.php on line 6
> 
> Warning:  ImageGif: No GIF support in this PHP build in
> /home/dotkard/www/current_time.php on line 7
>
> I checked the phpinfo but failed to find which variable I should turn on.
>
> Alex
>
> > Alex,
> > Easy to do what you want.  Check out the "image" functions in the php
> > manual.  There are some font limitations, specifically dealing with
> > alternate characters, but you'll find out what works and what doesn't
soon
> > enough.
> > Hugh
> >
> > - Original Message -
> > From: "Alex Shi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, February 14, 2003 10:16 AM
> > Subject: [PHP] text to image
> >
> >
> > > Hello,
> > >
> > > I am thinking to create php script to dynamically convert a text
string
> to
> > > image. My questions are:
> > >
> > > 1. with a given text string, say "hello, world", is it possible to
> > > dynamically
> > > convert it to an image? and what php built-in functions can be
utilized?
> > > 2. if I want to use true-type verdana font, can I just upload the
> windows
> > > font file to the web server (linux) and use php to load the font?
> > >
> > > Thanks in advance!
> > >
> > > Alex Shi
> > >
> > >
> > >
> > > --
> > > ==
> > > Cell Phone Batteries at 30-50%+ off retail prices!
> > > http://www.pocellular.com
> > > ==
> > > TrafficBuilder Network:
> > > http://www.bestadv.net/index.cfm?ref=7029
> > > ==
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>


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




[PHP] again, dynamic image of text string

2003-02-15 Thread Alex Shi
Hi,

I am using following script to generate a dynamic picture from 
a text string. It works fine for both my developing server and the
application server (a virtual host). Both server are Linux RH. 



The ImageString utilizes a php built-in font to generate image. 
However if replace this function with ImageFtText() (see the 
commented line), it will get error on both servers. 

On my developing server the error is "no ttf support". I checked 
phpinfo and in the GD section it says it does not have ttf support, 
so I would assume a recompiling with ttf support will resolve the 
issue.  

On the application server since the server API is CGI but not 
Apache, all type of errors will be shown as 500 internal error. 
I checked the phpinfo in its GD section ttf support is enabled. 
I tried several different types of fonts but all get same error. 
I found those font files from windows and uploaded them to the 
server. I don't if the Windows fonts could work for Linux.


Alex Shi


-- 
==
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029
==

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




[PHP] Post method

2003-02-28 Thread Alex Shi
Hi,

Any one know in a php script, if it is possible to simulate a post method?
I mean I want to header() to an url but don't like to embed the parameters
into that url.

Thanks in advance!

Alex Shi


-- 
==
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029
==

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



Re: [PHP] Post method

2003-02-28 Thread Alex Shi
> Curl will let you perform post operationgs, take a look at
> http://www.php.net/curl.
>
> Note you will need to have libcurl installed and PHP will have to be
> compiled with curl support.
>
> There are also probably classes that allow you to do post requests, take
> a look at the script repositories, hotscripts.com and you might try
> phpclasses.org as well.
  ^^
Thanks! I found a great class in phpclasses.org.

Alex


>
> Jason
> On Fri, 2003-02-28 at 14:09, Alex Shi wrote:
> > Hi,
> >
> > Any one know in a php script, if it is possible to simulate a post
method?
> > I mean I want to header() to an url but don't like to embed the
parameters
> > into that url.
> >
> > Thanks in advance!
> >
> > Alex Shi
> >
> >
> > --
> > ==
> > Cell Phone Batteries at 30-50%+ off retail prices!
> > http://www.pocellular.com
> > ==
> > TrafficBuilder Network:
> > http://www.bestadv.net/index.cfm?ref=7029
> > ==
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>


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



[PHP] How to set a timeout limit for a call of a connection?

2003-03-10 Thread Alex Shi
Hi,

I have a script in which there is a call to open a remote file:

fopen ("http://www.somewhere.com/file.php?foo=bar";, "r");

Sometimes if www.somewhere.com is down, it will stuck at the function
for very long a time. I hope to setup a timeout limit for this function
(just
this), so that it won't stay very long to wait for a result, but just quit
if the
call take a time longer than timeout limit, and then go on for next steps.

Thanks in advance!

Alex Shi


--
==
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==
TrafficBuilder Network:
http://www.bestadv.net/index.cfm?ref=7029
==


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



Re: [PHP] How to set a timeout limit for a call of a connection?

2003-03-10 Thread Alex Shi
> > I have a script in which there is a call to open a remote file:
> > 
> > fopen ("http://www.somewhere.com/file.php?foo=bar";, "r");
> > 
> > Sometimes if www.somewhere.com is down, it will stuck at the function
> > for very long a time. I hope to setup a timeout limit for this
> function
> > (just
> > this), so that it won't stay very long to wait for a result, but just
> quit
> > if the
> > call take a time longer than timeout limit, and then go on for next
> steps.
> 
> You can't control the timeout with fopen(). Try looking at fsockopen().
> You can set a timeout for that.

I checked the manual. From the example, it is apparently that timeout only 
works for the handle setup by fsockopen, but not for fsockopen itself.

Alex


> 
> ---John W. Holmes...
> 
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
> 
> 

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



Re: [PHP] How to set a timeout limit for a call of a connection?

2003-03-10 Thread Alex Shi
> > I have a script in which there is a call to open a remote file:
> > 
> > fopen ("http://www.somewhere.com/file.php?foo=bar";, "r");
> > 
> > Sometimes if www.somewhere.com is down, it will stuck at the function
> > for very long a time. I hope to setup a timeout limit for this
> function
> > (just
> > this), so that it won't stay very long to wait for a result, but just
> quit
> > if the
> > call take a time longer than timeout limit, and then go on for next
> steps.
> 
> You can't control the timeout with fopen(). Try looking at fsockopen().
> You can set a timeout for that.

Oh, yes, you are right! there is a parameter for timeout! 
Thanks a lot!

alex


> 
> ---John W. Holmes...
> 
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
> 
> 

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



[PHP] convert Excell to MySQL table

2003-06-17 Thread Alex Shi
Hello,

Does any one out there happend to know a php solution to directly 
(without CSV) transfer an Excell spreadsheet into MySQL table?
Thanks in advance!

Alex


-- 
==
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029
==

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



Re: [PHP] convert Excell to MySQL table

2003-06-17 Thread Alex Shi
Yes I believe this is an excellent solution for MS planforms...
But how about UNIX/Linux/FreeBSD based applications?

Alex


:[EMAIL PROTECTED]
> If it doesn't have to be automatic, I believe you can open
> an ODBC connection to the MySQL database and use the export
> functionality of Excel. I may be wrong since it's been a
> while since I've done anything with Excel, but it's worth
> a try.
> 
> 
> 
> On Tue, 2003-06-17 at 11:09, Alex Shi wrote:
> > Hello,
> > 
> > Does any one out there happend to know a php solution to directly 
> > (without CSV) transfer an Excell spreadsheet into MySQL table?
> > Thanks in advance!
> > 
> > Alex
> > 
> > 
> > -- 
> > ==
> > Cell Phone Batteries at 30-50%+ off retail prices!
> > http://www.pocellular.com
> > ==
> > TrafficBuilder Network: 
> > http://www.bestadv.net/index.cfm?ref=7029
> > ==
> -- 
> Adam Voigt ([EMAIL PROTECTED])
> Linux/Unix Network Administrator
> The Cryptocomm Group
> 

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



[PHP] Template and Replacement

2002-08-13 Thread Alex Shi

Hello,

Currently I am using following method to generate dynamic page
content:

1. Create a page template, in which the places where substitution 
is supposed to take place are marked by a key bracketed with 
'{' and '}'. For example: {news}, {date}, {headlines}, {article_content}..

2. in php script:
- prepare all the content and assign them to varialbes which have 
exactly the same name as the keys in the template. for example:
$news = "...";
$headlines = "...";


- create a array using all the keys in the template. in this example
it is:
$keys = array (news, date, headlines, article_content);

- dump the template into a buffer:
$page = file ($template_file_path);

- do replacement:
foreach ($keys as $key ){
   $page = str_replace ('{'.$key.'}', $$key, $page);
}

- send out the page:
print $page;



OKay, this process works perfect. However I am thinking that 
this might not be a effective way do to replacement because
for each key replacement the whole template has to be scanned.
No, this is too expensive. What I am currently thinking is, just
use one scan but do all replacements. Here is my proposed 
solution:

1. create an associcate array using the keys and their values:
$pattern = array (
  news => "...";
  date => "...",
  headlines => "...",
  
);

2. scan the template and, when found something matched with
'{[what_ever_a_key]}', replace it with $pattern[what_ever_a_key]. 

I would assume that with step 2 just one scan all replacements
can be done. However I don't know with what php function and
regex this solution can be implemented. Any suggestion, advice
are highly appreciated!

alex
-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] upgrading

2002-08-13 Thread Alex Shi

Hi,

I am currently have PHP 4.0.4p11 and Apache 1.3.19 running 
on RH Linux 7.1. Now I am thinking of upgrade my PHP to 4.1.2-7 
(the version come with RH 7.3). I have downloaded all 4.1.2-7 rpm 
packages altogether 10 files. I will stay with RH 7.1 but upgrade
PHP to 4.1.2-7. I am going to do upgrading later today, but hope
to know any advice if any one out there have such experience 
and has something to say abou this. Thanks in advance!

Alex



-
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] Need a Web Host for php/mySQl

2002-08-13 Thread Alex Shi

"Thomas Edison Jr." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Glory,
>
> I'm looking for a new Web Hosting company, to host my
> sites. I had been with Aletia, but i'm experiencing
> some technical flaws with them, so i need a new one.
> Aletia is very economical, with $7.95 a month for 200
> MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a
> lot of goodies. so i would prefer someone like them or
> better then them. I'd really appreciate if someone can
> find me a better Host.
>
> Thanks,
> T. Edison Jr.
>

It's hard to obtain a better one considering the price and
services.

Alex


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




[PHP] upgrading error

2002-08-13 Thread Alex Shi

I have PHP 4.0.4p11 on RH Linux 7.1. Today I downloaded PHP 4.1.2-7
rpm packages (10 packages) from RH web site. These packages are
come with RH Linux 7.3. I don't want to upgrade Linux but just upgrade
PHP so I tried rpm -Uvh php-4.1.2-7.i386.rpm. 

I got following error message:

error: failed dependencies:
libcrypto.so.2   is needed by php-4.1.2-7
libcurl.so.2   is needed by php-4.1.2-7
libdb-3.3.so   is needed by php-4.1.2-7
libltdl.so.3   is needed by php-4.1.2-7
libmm.so.11   is needed by php-4.1.2-7
libpspell.so.4   is needed by php-4.1.2-7
libssl.so.2   is needed by php-4.1.2-7
libxml2.so.2   is needed by php-4.1.2-7
php = 4.0.4pl1-9 is needed by php-imap-4.0.4pl1-9
php = 4.0.4pl1-9 is needed by php-ldap-4.0.4pl1-9
php = 4.0.4pl1-9 is needed by php-mysql-4.0.4pl1-9
php = 4.0.4pl1-9 is needed by php-pgsql-4.0.4pl1-9
php = 4.0.4pl1-9 is needed by php-manual-4.0.4pl1-9

Any idea? Seems like it is impossible to directly upgrade from 4.0.4
to 4.1.2-7Please advice. Thanks in advace!

Alex
-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] wanto uninstall php manual

2002-08-13 Thread Alex Shi

Hi,

I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update 
Agent). The new php includes a huge manual but I cannot find where is
it after installed, and I don't know how can access it. And more, my free
disk space is only 120M. So I am thinking to uninstall this manual. Any
one know how can do uninstallation? Thanks in advance!

Alex

P.S. thank @ Edwin for your suggestion for upgrading.

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] wanto uninstall php manual

2002-08-13 Thread Alex Shi
Thanks! It works as I expected ;-) Alex

--
---
TrafficBuilder Network:
http://www.bestadv.net/index.cfm?ref=7029

"@ Edwin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I haven't use up2date but perhaps this will work anyway. Open a terminal
> and execute this:
>
>   rpm -ql php-manual
>
> The 'l' will tell you where the package was installed. While,
>
>   rpm -e php-manual
>
> will uninstall the package...
>
> HTH
>
> - E
>
>
> >
> >Hi,
> >
> >I upgraded php from 4.0.4p11 to 4.0.6 with up2date (a RedHat Update
> >Agent). The new php includes a huge manual but I cannot find where is
> >it after installed, and I don't know how can access it. And more, my free
> >disk space is only 120M. So I am thinking to uninstall this manual. Any
> >one know how can do uninstallation? Thanks in advance!
> >
> >Alex
> >
> >P.S. thank @ Edwin for your suggestion for upgrading.
> >
>
> You're welcome!
>
> >--
> >---
> >TrafficBuilder Network:
> >http://www.bestadv.net/index.cfm?ref=7029
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> _
> $B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B
> http://career.msn.co.jp/
>


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


[PHP] Link for downloading?

2002-09-06 Thread Alex Shi

Hello,

How to create a link that when click it will lauch file downloading at
client's end.

And another question which might be biased from this topic, but 
still related with the subject of this message: why some downloading 
link will lauch a ftp client such as NetAnts or Download Accelerator 
while other link will start a Window's builtin download window?

Alex

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




[PHP] Re: Link for downloading?

2002-09-06 Thread Alex Shi

Thanks...but how to use header() to generate such a download link?

Alex


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> First, to create a link thats just a  that point to the file.
> ie file
>
> Second, that depend of your windows's default configuration.
>
> --
>
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
>
> "Alex Shi" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > Hello,
> >
> > How to create a link that when click it will lauch file downloading at
> > client's end.
> >
> > And another question which might be biased from this topic, but
> > still related with the subject of this message: why some downloading
> > link will lauch a ftp client such as NetAnts or Download Accelerator
> > while other link will start a Window's builtin download window?
> >
> > Alex
>
>


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




Re: [PHP] Link for downloading?

2002-09-06 Thread Alex Shi

Thanks for your reply! Still have another question: How to use 
header() to generate download link?

Alex

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 7:27 AM
Subject: Re: [PHP] Link for downloading?


> Question 1:
> I think this has to do with how you attribute your file extensions in 
> httpd.conf (Apache thing, not PHP), so check out the docs on apache.org
> 
> Question 2:
> I woudl tend to believe it depends what kind of link it is...
> is it and HTTP downlaod site (which would use the windows "save file as" 
> dialog, or is it a link to an FTP site, which may use your local FTP 
> software...
> 
> HTH
> -Brad
> 
> > Hello,
> > 
> > How to create a link that when click it will lauch file downloading at
> > client's end.
> > 
> > And another question which might be biased from this topic, but 
> > still related with the subject of this message: why some downloading 
> > link will lauch a ftp client such as NetAnts or Download Accelerator 
> > while other link will start a Window's builtin download window?
> > 
> > Alex
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> 
> 
> 

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




[PHP] stupid question

2002-09-06 Thread Alex Shi

I have almost two years of experience in PHP. so don't think qualified for 
being a newbie...However still found something don't know when reading 
other's code :( 

Here is what I want to know: $Global{'hello'}. What this means? Is it a 
Variable-variable?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] Re: stupid question

2002-09-06 Thread Alex Shi

I checked the code again...it is $Globals{'lala'}...


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I never saw that is it really working? it is supposed to be
$_GLOBAL['lala']
> too.. but..
>
> --
>
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
>
> "Alex Shi" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > I have almost two years of experience in PHP. so don't think qualified
for
> > being a newbie...However still found something don't know when reading
> > other's code :(
> >
> > Here is what I want to know: $Global{'hello'}. What this means? Is it a
> > Variable-variable?
> >
> > Alex
> >
> > --
> > ---
> > TrafficBuilder Network:
> > http://www.bestadv.net/index.cfm?ref=7029
> >
>
>


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




[PHP] checkbox question

2002-09-08 Thread Alex Shi

How to ontain data from a group of checkbox using same name?
For example, in a form there're 6 checkboxes and all named as
"Interesting_Area". I know if put a pairs of square brackets at the
end of the name then in php all the values of them can be ontained.
However, for some reason I cannot use square brackets. Please
help me out if anyone know how to do the trick. THanks!

Alex


-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] checkbox question

2002-09-09 Thread Alex Shi

Thanks for your reply!

I tested $_SERVER['QUERY_STRING']. Seems like it only return the
string for get method but not for post. Any idea?

Alex



"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If you cannot use square brackets, get the values yourself from
> $_SERVER['QUERY_STRING']
>
> Alex Shi wrote:
>
> >How to ontain data from a group of checkbox using same name?
> >For example, in a form there're 6 checkboxes and all named as
> >"Interesting_Area". I know if put a pairs of square brackets at the
> >end of the name then in php all the values of them can be ontained.
> >However, for some reason I cannot use square brackets. Please
> >help me out if anyone know how to do the trick. THanks!
> >
> >Alex
> >
> >
> >
> >
>


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




[PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Alex Shi

What these two things mean: __FILE__ and __LINE__ ?

I searched manul but find nothing about them...

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] What these two things mean: __FILE__ and __LINE__

2002-09-10 Thread Alex Shi

I read the link, still don't get what are the exact meaning of those
two things. What the link refered is a section from PHP manul that
I have a copy on my local computer, and to me it doesn't seems
like a formal defination of them. From the messages appending
to the ariticle I saw one more thing don't understand: __PATH__.

Alex


"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
008801c2590a$28d7ede0$6501a8c0@kevin">news:008801c2590a$28d7ede0$6501a8c0@kevin...
> http://www.php.net/manual/en/language.constants.php
> -Kevin
>
>
> - Original Message -
> From: "Alex Shi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 2:31 PM
> Subject: [PHP] What these two things mean: __FILE__ and __LINE__
>
>
> > What these two things mean: __FILE__ and __LINE__ ?
> >
> > I searched manul but find nothing about them...
> >
> > Alex
> >
> > --
> > ---
> > TrafficBuilder Network:
> > http://www.bestadv.net/index.cfm?ref=7029
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


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




[PHP] datetime convert

2002-09-12 Thread Alex Shi

Hi,

I'm  trying to convert a formated datetime string into a timestamp.
The string format is "Y-m-d H:i:s". I use strtotime() to convert the
datetime string. However, the converted datetime seems lost its 
time part. Is there any easy solution to make the converting? 
Thanks in advance!

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] PHP 4.2.2 vs PHP 4.0.6

2002-10-01 Thread Alex Shi

THanks!



"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
000f01c269a4$a7329be0$7c02a8c0@coconut">news:000f01c269a4$a7329be0$7c02a8c0@coconut...
> > I didn't realized that PHP had been going so fast that it was creating
> > problems for compatiblility.
> >
> > Here is my situation: PHP on my development server is 4.0.6 while
> > on the application server it is PHP 4.2.2. I bet you all know that
> there's
> > a huge basic differences between the two but I don't know them!
> > In PHP 4.2.2, variables passed by either GET or POST method can
> > not be accessed straitforwardly by their name, you have to fetch them
> > from $HTTP_POST_VARS or $HTTP_GET_VARS. To my understanding,
> > directly using submitted variables by their name is one of the basic
> great
> > PHP features, and I always use vars in this way. However, you can
> > imagine that, recently due to the PHP upgrading I got bunch of
> problems
> > when deploying.
> >
> > What I want to know are:
> > 1. why PHP changed the way to access submitted vars;
>
> PHP wasn't changed, it just changed the default of one configuration in
> php.ini. Set your register_globals back to ON and things are just as
> they were in the past.
>
> It was changed to stop poorly written code from having as many security
> issues. If you use a variable $var, you have no idea if it came from the
> user, session, cookie, or from the script. You have to remember it
> yourself. So, you may assume your script made $var, but it really came
> from the URL. Using $_GET['var'] lets you know for sure that that value
> came from the url. With register_globals off, you know $var was created
> from within your scripts and cannot of came from a user.
>
> > 2. any good suggestion to avoid this problem, such as that is it
> possible
> > to configure 4.2.2 to compatible downward.
>
> register_globals = On
>
> ---John Holmes...
>
>


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




[PHP] PHP version

2002-10-01 Thread Alex Shi

Is there any way to report PHP version?


-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] PHP 4.2.2 vs PHP 4.0.6

2002-10-01 Thread Alex Shi

Hi,

I didn't realized that PHP had been going so fast that it was creating 
problems for compatiblility. 

Here is my situation: PHP on my development server is 4.0.6 while
on the application server it is PHP 4.2.2. I bet you all know that there's 
a huge basic differences between the two but I don't know them!
In PHP 4.2.2, variables passed by either GET or POST method can
not be accessed straitforwardly by their name, you have to fetch them
from $HTTP_POST_VARS or $HTTP_GET_VARS. To my understanding,
directly using submitted variables by their name is one of the basic great 
PHP features, and I always use vars in this way. However, you can 
imagine that, recently due to the PHP upgrading I got bunch of problems
when deploying.

What I want to know are:
1. why PHP changed the way to access submitted vars;
2. any good suggestion to avoid this problem, such as that is it possible 
to configure 4.2.2 to compatible downward.

Thanks!

Alex Shi

BTW: my development server is RH Linux 7.1 so cannot upgrade PHP
to 4.2.2.



-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] Server API

2002-10-02 Thread Alex Shi

Hi,

My hosting provider still using CGI as Server API. I think this is way too
much dropped behind. On my own development server I use Apache as
Server API. However, maybe this could be a kind of consideration for
the situation that multi-sites hosted on one server? I am thinking I'd
better
learn something before I ask my hosting provier. Thanks!

Alex Shi

--
---
TrafficBuilder Network:
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] need help for a where clause

2002-10-06 Thread Alex Shi

Hi,

I need a where clause in following situation:

Say I want to query two tables: A and B. In table A there is field 
Afn, while in table B there are 3 fields: Bfn1, Bfn2 and Bfn3. I want  
to do a query, in which the where clause must do these things: 

if A.Afn=1, then check value of B.Bfn1;
if A.Afn=2, then check value of B.Bfn2;
if A.Afn=3, then check value of B.Bfn3.

So how can I create such a where clause to do this? 
Thanks in advance!

Alex Shi


-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] How to drop a element from an array

2002-10-06 Thread Alex Shi

Is there a good way do drop an element from an array?

Alex Shi



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




Re: [PHP] How to drop a element from an array

2002-10-06 Thread Alex Shi

Yes I have read about the array functions in the manul. But I don't
think they are what I need. What I want is to drop what ever an
element from an array, not just from top or bottom.

I can create a function to do this. But I need a better solution, that
is to say not to cost too much memery.

Alex Shi


"Timothy J Hitchens" <[EMAIL PROTECTED]> 写入消息新闻
:002e01c26d89$780c14c0$[EMAIL PROTECTED]
> Hint... look at array_push etc (like a stack)
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Alex Shi [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 7 October 2002 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to drop a element from an array
>
>
> Is there a good way do drop an element from an array?
>
> Alex Shi
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] How to drop a element from an array

2002-10-06 Thread Alex Shi

Thanks!

Alex Shi


"Timothy J Hitchens" <[EMAIL PROTECTED]> 写入消息新闻
:002f01c26d8a$77332470$[EMAIL PROTECTED]
unset $some_variable[4];

then you would need to resort... etc (if needed)


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-----
From: Alex Shi [mailto:[EMAIL PROTECTED]]
Sent: Monday, 7 October 2002 8:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to drop a element from an array


Yes I have read about the array functions in the manul. But I don't
think they are what I need. What I want is to drop what ever an element
from an array, not just from top or bottom.

I can create a function to do this. But I need a better solution, that
is to say not to cost too much memery.

Alex Shi


"Timothy J Hitchens" <[EMAIL PROTECTED]> 写入消息新闻
:002e01c26d89$780c14c0$[EMAIL PROTECTED]
> Hint... look at array_push etc (like a stack)
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Alex Shi [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 7 October 2002 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to drop a element from an array
>
>
> Is there a good way do drop an element from an array?
>
> Alex Shi
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



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




Re: [PHP] need help for a where clause

2002-10-06 Thread Alex Shi

Thanks! This is what I need!

Alex Shi



"Sascha Cunz" <[EMAIL PROTECTED]> 写入消息新闻
:[EMAIL PROTECTED]
A solution on that depends strongly on how much values A.Afn would take. For
3, it's still okay. But i wouldn't do more.

Against what shall the B.Bfn* be checked? What Data do you want to be
returned
from the query?

try:

SELECT ### FROM A, B WHERE
  ((A.Afn=1) AND (B.Bfn1 = ...)) OR
  ((A.Afn=2) AND (B.Bfn2 = ...)) OR
  ((A.Afn=3) AND (B.Bfn3 = ...))

where you should replace ### with things you want to select and ... with the
things you want to check.

On more than 3 different values for A.Afn, you should use a more normalized
version of B.

i.e.: B contains only one Bfn field and a Reference to A.Afn.
 -> SELECT ### FROM A, B WHERE B.AfnRef = A.Afn AND B.Bfn = ...

Sascha

Am Montag, 7. Oktober 2002 00:33 schrieb Alex Shi:
> Hi,
>
> I need a where clause in following situation:
>
> Say I want to query two tables: A and B. In table A there is field
> Afn, while in table B there are 3 fields: Bfn1, Bfn2 and Bfn3. I want
> to do a query, in which the where clause must do these things:
>
> if A.Afn=1, then check value of B.Bfn1;
> if A.Afn=2, then check value of B.Bfn2;
> if A.Afn=3, then check value of B.Bfn3.
>
> So how can I create such a where clause to do this?
> Thanks in advance!
>
> Alex Shi


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




[PHP] Referrer

2002-10-07 Thread Alex Shi

How can know the referrer of a script?
Let's say script B is linked from script/page A. Is it possible to
obtain A's name in script B?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP] test

2002-11-19 Thread shi ziye
test post only

_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




[PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread shi ziye
WOOP (Web Object Of Php)
Have you write PHP program like this ?

// begin
class TForm extends System_UI_Form
{
	function init()
	{
		$this->label1 = & new System_UI_Label("label1", &$this);
		$this->button1 = & new System_UI_Button("button1", &$this);
		$this->button2 = & new System_UI_Button("button2", &$this);
		
		$this->label1->caption = "23";

		$this->button1->caption = "number+1";
		$this->button1->onclick = "button1click";
		
		$this->button2->caption = "number-1";
		$this->button2->onclick = "button2click";
	}

	function button1click()
	{
		$this->label1->caption++;
	}
	
	
	function button2click()
	{
		$this->label1->caption--;
	}	
}

$form1 = & new TForm("form1");
$form1->init();

//end

to see the result of this program
Goto http://www.shiziye.net/woop

I need your help to finish this system together!!!



_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




Re: [PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread shi ziye
I want hackers to help me to finish the whole project!!!
It is only the begining. and it will change our web programing method
Goto www.shiziye.net/woop to see more!
Mail to [EMAIL PROTECTED] if you want to help me.


Is there a question in here somewhere? What do you need help with?

---John Holmes...

- Original Message -
From: "shi ziye" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 9:20 AM
Subject: [PHP] New generation of PHP Program, reaction to ASP.NET


> WOOP (Web Object Of Php)
> Have you write PHP program like this ?
>
> // begin
> class TForm extends System_UI_Form
> {
> function init()
> {
> $this->label1 = & new System_UI_Label("label1", &$this);
> $this->button1 = & new System_UI_Button("button1", &$this);
> $this->button2 = & new System_UI_Button("button2", &$this);
>
> $this->label1->caption = "23";
>
> $this->button1->caption = "number+1";
> $this->button1->onclick = "button1click";
>
> $this->button2->caption = "number-1";
> $this->button2->onclick = "button2click";
> }
>
> function button1click()
> {
> $this->label1->caption++;
> }
>
>
> function button2click()
> {
> $this->label1->caption--;
> }
> }
>
> $form1 = & new TForm("form1");
> $form1->init();
>
> //end
>
> to see the result of this program
> Goto http://www.shiziye.net/woop
>
> I need your help to finish this system together!!!
>
>
>
> _
> Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



_
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/lccn/ 


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



[PHP] test

2002-11-19 Thread shi ziye
not sure how to post, sorry!

_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




Re: [PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-20 Thread shi ziye
Are you interested in this?!
New generation of PHP Program, reaction to ASP.NET


WOOP (Web Object Of Php)
Have you write PHP program like this ?

// begin
class TForm extends System_UI_Form
{
function init()
{
$this->label1 = & new System_UI_Label("label1", &$this);
$this->button1 = & new System_UI_Button("button1", &$this);
$this->button2 = & new System_UI_Button("button2", &$this);

$this->label1->caption = "23";

$this->button1->caption = "number+1";
$this->button1->onclick = "button1click";

$this->button2->caption = "number-1";
$this->button2->onclick = "button2click";
}

function button1click()
{
$this->label1->caption++;
}


function button2click()
{
$this->label1->caption--;
}
}

$form1 = & new TForm("form1");
$form1->init();

//end

to see the result of this program
Goto http://www.shiziye.net/woop

I need your help to finish this system together!!!



_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




[PHP] Convert MySQL table into Access or Excell format

2002-07-12 Thread Alex Shi

Hello,

My client has a website and it support MySQL/PHP. The client want 
to download the MySQL tables and then access them in Excell or 
Access. So my question is, is it possible to convert MySQL table into 
Access or Excell format? Thanks in advance for all answer!

Alex


-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




Re: [PHP] Convert MySQL table into Access or Excell format

2002-07-12 Thread Alex Shi

The thing is that, the MySQL table resides on a remote web server, my client
want to download it and access it in Access.

Alex

> You can also use ODBC (Ships with Acess) to make a DSN connection to
MySQL.
> Access can retrieve data from any ODBC DSN.
>
> Jason White
>
> - Original Message -
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 12, 2002 9:48 PM
> Subject: Re: [PHP] Convert MySQL table into Access or Excell format
>
>
> > On Saturday 13 July 2002 06:48, Alex Shi wrote:
> > > Hello,
> > >
> > > My client has a website and it support MySQL/PHP. The client want
> > > to download the MySQL tables and then access them in Excell or
> > > Access. So my question is, is it possible to convert MySQL table into
> > > Access or Excell format? Thanks in advance for all answer!
> >
> > archives -> "mysql excel"
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> >
> > /*
> > After years of research, scientists recently reported that there is,
> > indeed, arroz in Spanish Harlem.
> > */
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


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




Re: [PHP] Convert MySQL table into Access or Excell format

2002-07-12 Thread Alex Shi

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Saturday 13 July 2002 13:31, Alex Shi wrote:
> > The thing is that, the MySQL table resides on a remote web server, my
> > client want to download it and access it in Access.
>
> Doesn't matter, ODBC works across a network.

But what can we do if the ISP closed 3306 port on their firewall?

>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> The young lady had an unusual list,
> Linked in part to a structural weakness.
> She set no preconditions.
> */
>


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




Re: [PHP] Convert MySQL table into Access or Excell format

2002-07-12 Thread Alex Shi

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Saturday 13 July 2002 14:00, Alex Shi wrote:
> > "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > > On Saturday 13 July 2002 13:31, Alex Shi wrote:
> > > > The thing is that, the MySQL table resides on a remote web server,
my
> > > > client want to download it and access it in Access.
> > >
> > > Doesn't matter, ODBC works across a network.
> >
> > But what can we do if the ISP closed 3306 port on their firewall?
>
> This thread is leading into non-PHP territory (ie you're better off asking
on
> the mysql list). Put simply, you can specify which port you want MySQL to
> use. However if the ISP only allows certain ports, eg SMTP, HTTP, _and_
> you're already using those ports, then you're stuck up a creek.
>
> Of course you can always ask your ISP to unblock that port. Why are _they_
> firewalling _your_ network anyway?

Sorry for the confusing...the "ISP" is the hosting company where my client's
web site hosted. That's why I need a php solution for this...

>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> What we do not understand we do not possess.
> -- Goethe
> */
>


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




Re: [PHP] Convert MySQL table into Access or Excell format

2002-07-13 Thread Alex Shi

> > > the mysql list). Put simply, you can specify which port you want MySQL
to
> > > use. However if the ISP only allows certain ports, eg SMTP, HTTP,
_and_
> > > you're already using those ports, then you're stuck up a creek.
> > >
> > > Of course you can always ask your ISP to unblock that port. Why are
> > > _they_ firewalling _your_ network anyway?
> >
> > Sorry for the confusing...the "ISP" is the hosting company where my
> > client's web site hosted. That's why I need a php solution for this...
>
> OK, export mysql tables to CSV, import into Access.

okay thanks a lot!

>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Try to be the best of whatever you are, even if what you are is no good.
> */
>


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




[PHP] header ('Content-type...') does not work properly if session_start initiated...

2003-09-26 Thread Alex Shi
Hello,

I have a strange problem with a download script. Here is the situation:
On my development server, the php is 4.0.6 while on the application 
server it is 4.3.2.  I created a very simple code for opening pdf in 
browser. the main part of it is like following:



This code is working perfect on development server. However
on the application server, it will first ask for confirm downloading
then report error saying that cannot download.

I checked the code line by line and found that if remove the first
line "session_start ()" then it will work in the correct way. However
session is required for this script. I don't understand why it works 
OK on the development server but not for application server.

Thanks in advance for all help!

Alex Shi

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



Re: [PHP] header ('Content-type...') does not work properly if session_start initiated...

2003-09-26 Thread Alex Shi
> Curt Zirzow wrote:
> > 
> > hmm.. i think i just rememberd that it might had to do with making 
> > sure that session.cache_limiter being set as 'nocache'.
> > 
> > Search the archives, the answer is there i believe.
> > 
> > Curt
> 
> You are close, it was session_cache_limiter('private_no_expire');

So, this function should be called before session_start ()? I will try...
thanks!

Alex

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



Re: [PHP] header ('Content-type...') does not work properly if session_start initiated...

2003-09-26 Thread Alex Shi
> Curt Zirzow wrote:
> > 
> > hmm.. i think i just rememberd that it might had to do with making 
> > sure that session.cache_limiter being set as 'nocache'.
> > 
> > Search the archives, the answer is there i believe.
> > 
> > Curt
> 
> You are close, it was session_cache_limiter('private_no_expire');

You are right, it is working perfect now! Thanks a bunch!

Alex

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



[PHP] php unlink a file - is it possible?

2003-10-08 Thread Alex Shi
Hi,

How can have a php script unlink/delete a file uploaded via FTP? 
Usually a ftp-uploaded file belongs to the ftp user, and a php
script is running by apache/nobody. Seems like there shouldn't
be any way to do this...OK, my situation is that I want a php script
to this: it can move bulk uploaded (ftp) file to certain directories 
and then remove the original files, something just like a "move".
If anyone knows on how to "move" or "delete" a file, please give 
me a hand. Thanks in advance!

Alex

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



[PHP] How Query Works?

2002-01-07 Thread Alex Shi

My situation is to access a remote MySQL server, and of course
I do care about traffic. Suppose In a script there's a query:

$result = mysql_query ("select * from employ where age>45")
or die ("Invalid query");

I am just wondering that if MySQL server would return all the query
result in total, so that the following fetches won't go to server again.
This is what I expect. However if it does in the other way, I mean
MySQL would hold the result and the following fetches had to go 
server to obtain dataOh my GOD it will definately cause trouble-
some traffic

Is it a MySQL question, or a PHP question? I'm not sure.
I am thinking that PHP's API would have something to do with 
Query behaviour.

Thanks for all reply in advance!

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How MySQL Query and Fetch work?

2002-01-08 Thread Alex Shi

Yesterday I posted a question yet got response. The question 
is regarding to how Query works. Now I repost it in a more 
specific way.

I am just wondering how MySQL API functions work. Let's look
at following two functions:

1. mysql_query(), 
2. mysql_fetch_array()

To my understanding, mysql_query() will definately to its job with
MySQL server. But how about the latter? Does it just fetch data
from client/local buffer, which is previously put in by mysql_query(), 
or still has to goto server side to fetch data?

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] MySQL connection problem?

2002-01-13 Thread Alex Shi

Here is my situation: 
1. Two hosts: HA and HB, both connected with each other via Internet.
2. On HA there is a MySQL server SA and a Web server WA, while on
HB there is a SB and a WB.
3. On WA there is a page, on which there are two buttons: ba and bb.
The ba is linked to a script sa.php while bb linked to sb.php. Both the 
scripts are lcated on HA. The sa.php only talks with SA while sb.php 
talks with both SA and SB. So connection between sb.php and SB 
will have to go via Internet.
4. Sometimes both the scripts works well, when click on either ba or 
bb the scritps responce very quickly. But sometimes there may be
problem with sb.php: when click on bb the WEB just stuck there and 
the small earth keep on rotating but nothing return. The most strange
thing is that, if something wrong with sb.php, you cannot stop it. You 
click browser's stop button (it do looks stopped because the earth 
stopped) and then click ba (will call sa.php), still got nothing return, 
the browser seems not wake from sb.php's problem.

I guess it might be something to do with MySQL connection via internet.
But have no clue how to look into the problem.

Could any one here can point me the right direction to get it fixed?

Thanks in advance!

Alex





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP don't know 'localhost'

2002-01-23 Thread Alex Shi

Hi,

Today I met a very strange problem. 
My system had been working perfect since long time back when
I setup mysql/php/apache on RH 7.1, until today I found that php
could not connect mysql with the user from 'localhost'. But actually
user@localhost can login to mysql from terminal. 'Locahost' just
don't work for PHP! However, if don't use 'localhost' but use the
system's nick name (my machine is called 'puma'), then the 
mysql->connect() success!

I just have no idea how it happend. Any one out there have idea
about this please help! Thanks in advance!

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Talk with a remote script

2002-02-03 Thread Alex Shi

Hi all,

I would like to know that, in php how to call a remote script, get return 
value from that script and, pass parameters to that script?

And one more question: can I throw a php script to linux background,
or preferably use perl script for background running instead?

Thanks for answers in advance!

Alex


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




Re: [PHP] mail() function not sending to Yahoo address

2002-02-03 Thread Alex Shi

Hi,

> Monday, February 04, 2002, 12:17:27 AM, recebi de John P. Donaldson:
> 
> John> I've tried several PHP form processors, and all of
> John> them have trouble sending the form contents to a Yahoo
> John> address.  When I change the address to something other
> John> than a Yahoo account, it sends the form results with
> John> no problem.  Is there an issue with PHP's mail
> John> function and Yahoo email addresses?
> 
> check your SMTP server in the configuration of PHP

Could you please further suggest how to check and what should
be check for this issue, and what could be a concern in php configuration
regarding to Yahoo account?

Thanks!

Alex

> 
>  
>  Ricardo J. Veludo
>  e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




[PHP] Zend Studio

2002-02-04 Thread Alex Shi

Hi,

After a long time absent from Zend I came across to it today just for
any new articles. To my surprise they changed their home page and
it seems like they are promoting their Zend Studio 2.0. I have no idea
what it is. Is it like a Visual Studio? Does it support template? If any
out there has ever used it could you please give some comment.

Thanks!

Alex Shi


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




[PHP] PHP script for command line

2002-02-05 Thread Alex Shi

I am now trying to use php script from command line. Everything is 
Ok except only one thing: it will always send out header msg. How 
can stop it from sending header?

Alex Shi


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




[PHP] How to obtain the script's path?

2002-02-12 Thread Alex Shi

Hi,

I have a script need to be launched from terminal, and I want
it to report the script's path. Because this script is required to
be launched from command line, so those Apache env vars
have not effect work, even $PHP_SELF don't work. 
Can anybody has a solution for this? Thanks in advance for
any answers!

Regards,

Alex



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




[PHP] I want to use a mailer other than sendmail

2002-05-03 Thread Alex Shi

Hi,

I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail 
as it's default mailer. However on my system sendmail has never 
been working well. So I am thinking that if it is possible to
configure php to use my ISP's SMTP server instead of using
the sendmail. Any one can help me out how to do this?

Thanks in advance!

Alex



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




Re: [PHP] I want to use a mailer other than sendmail

2002-05-03 Thread Alex Shi

Thank you, Rasmus. I am going to try your way right away..

Alex

> Alex, the real answer is to just turn your sendmail into a SMTP
> passthrough.  It is dead simple to do.  Locate your sendmail.cf file.
> (Yeah, I can already hear the screams of anguish, but this file isn't
> actually all that bad)
> 
> Now find the line that starts with "DS" and change it so it says:
> 
> DSmail.mindspring.com
> 
> for example.
> 
> Then restart your sendmail.  And now hocus-pocus-presto-shazzam, your
> sendmail suddenly works great for all your apps, not just PHP.
> 
> -Rasmus
> 
> On Fri, 3 May 2002, John Holmes wrote:
> 
> > >From php.ini:
> >
> > [mail function]
> > SMTP = localhost ;for
> > win32 only
> > sendmail_from = [EMAIL PROTECTED] ;for win32 only
> > ;sendmail_path =
> >
> > Enter the name of your SMTP server on the first line, instead of
> > localhost. If you use mindspring, for example, you would put
> > mail.mindspring.com instead of localhost.
> >
> > ---John Holmes...
> >
> > > -Original Message-
> > > From: Alex Shi [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 03, 2002 6:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] I want to use a mailer other than sendmail
> > >
> > > Hi,
> > >
> > > I am using PHP 4.0.4pl1 on RH 7.0. I know PHP uses sendmail
> > > as it's default mailer. However on my system sendmail has never
> > > been working well. So I am thinking that if it is possible to
> > > configure php to use my ISP's SMTP server instead of using
> > > the sendmail. Any one can help me out how to do this?
> > >
> > > Thanks in advance!
> > >
> > > Alex
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 


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




[PHP] Send html email

2002-05-11 Thread Alex Shi

Hi!

How can I send a html email with just the build-in function mail()? 
Is this required to put some infomation in "header" field? Thanks
in advance!

Alex

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




Re: [PHP] Send html email

2002-05-11 Thread Alex Shi

Thanks for all of you who answered my question. But another of
my stupid question is: what is RTFM?

Alex

"Michael Geier" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> While I understand the necessity in not answering every question that a
newbie
> may post, a more pleasant approach would have been:
>
> "the following is documented at
http://www.php.net/manual/en/function.mail.php";
> or
> "see the Content-Type: header for instructions on how to do this".
>
> Do you think someone who won't read the docs, or search the archives,
prior to
> the question understands what RTFM means?
>
> My recommendation: http://phpmailer.sourceforge.net
> While this is not using the mail() function, it is a more robust, more
> functional method of sending mail, including multi-part, SMTP-Auth,
> attachments, etc, that works with a variety of MTAs including Sendmail,
Qmail,
> and direct SMTP transport.
>
> --
> Michael Geier
> CDM Sports, Inc. - Systems Administrator
> email: [EMAIL PROTECTED]
>
> Quoting Liam MacKenzie <[EMAIL PROTECTED]>:
>
> > RTFM
> > http://www.php.net/manual/en/function.mail.php
> >
> >
> >
> > - Original Message -
> > From: "Alex Shi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, May 12, 2002 10:00 AM
> > Subject: [PHP] Send html email
> >
> >
> > Hi!
> >
> > How can I send a html email with just the build-in function mail()?
> > Is this required to put some infomation in "header" field? Thanks
> > in advance!
> >
> > Alex
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> -
> This mail sent through CDM Sports Webmail.


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




[PHP] How can obtain referer's name?

2002-05-12 Thread Alex Shi

Hi!

I want to know how can a script obtain the page name where 
it was linked. e.g., there's a link on page.html, and the link 
points to script.php, how can script.php know the name of
page.html? Thanks in advance for all answer!

Alex

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




[PHP] How is SESSION_ID passed?

2002-05-24 Thread Alex Shi

Hello,

I have created several web sites using php. In all these sites
session id is passed via cookie. However I noticed that some
times it was passed by url. I am thinking that to pass session
id by url will be safer than by cookie. However I don't know 
how can do this without change my code. Do I have to do any
configuration on php so that I can use url session id but don't
need to modify my code?

Alex

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




[PHP] Re: Newbie Questionabout variables

2002-05-25 Thread Alex Shi

Not sure what your question is

In the case "password" is not a variable but the value of
the variable, while "admin" is the name of the variable.

Variables passed by url is obtained by GET method, and
in your script all vairables passed by GET method can be
accessed directly. So, in following script,



the result of print will be "password".

If this is not the answer to your quesiton, pls clarify.

Alex


"Al" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I hope this posting is not a duplicate.  I originally posted it yesterday,
> but it doesn't show on the newsgroup for me.
>
> Apparently you can set a variable as part of a URL statement.  For
example:
> www.company.com/index.php?admin=password.
>
> Where "password" might be a simple variable to test as a rudimentary
> authorization password.
>
> I can't find anything like this on the php website or manual.
>
> Can someone point me in the right direction?
>
> Thanks
>
>


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




[PHP] Re: PHP script

2002-05-25 Thread Alex Shi

For file uploading:
http://www.php.net/manual/en/features.file-upload.php

For chmod:
http://www.php.net/manual/en/function.chmod.php

For the third question:
php has no restriction where php scripts have to be
put in. so just put the script where you want to upload file.

Hope these can help.

Alex


"R" <[EMAIL PROTECTED]> wrote in message
000801c203db$5ba81b20$0a6da8c0@lgwezec83s94bn">news:000801c203db$5ba81b20$0a6da8c0@lgwezec83s94bn...
> Hi Guys,
>
>  I need a PHP script that will allow me to upload/download chmod files etc
> on
>  a remote server...
>  I know there are loads of these scripts out there but being a newbie to
PHP
>  I really dont know which one is good...
>  can you recomend any? coming from Java I love PHP so would appreciate if
> you
>  would recomend only a php script and not perl,servlet,asp etc.
>  Another problem is my webserver is something like
>  /wtn/cgi-bin/www/
>
>  all cgi scripts will have to be put in the cgi-bin directory of course
but
>  must be called like this mysite.com/cgibin/script.pl
>
>  the php script should allow me access to this directory too!
>
>  ANY ideas or recomendations will be deeply appreciated esp from John
> Holmes,
>  Jason Wong, Miguel Cruz coz you guys are really brainy and have helped me
> in
>  the past so I know your advise is supurb.
>  I would tip my hat to you, but dont wear one...;-)
>
>  Cheers,
>  -Ryan A.
>
>
>


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




Re: [PHP] Visual PHP Studio--comments?

2001-10-19 Thread Alex Shi

Where you find it? Why not show up the link?

Actually I have been always thinking of a php studio. I think at least
following
things could be integrated into such a studio: a php IDE bundled with a web
authority tool, and port to SQL server and web server.

Alex


- Original Message -
From: "René Fournier" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 3:50 PM
Subject: [PHP] Visual PHP Studio--comments?


> Just found this app, and wondered if anyone here is using it and could
> comment on it.  I was just wondering how it might help me do basic PHP
> development more than a good editor alone.  (I am a PHP newbie, so perhaps
> it's just overkill.)
>
> ...Rene
>
> ---
> Rene Fournier
> [EMAIL PROTECTED]
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Microsoft Access

2001-10-25 Thread Alex Shi

Hi Folks,

Does any one here know how to access MS Access file in PHP? And is it
possible to do it on a platform other than Window NT/2K, such as Linux or
FreeBSD?

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP Environment Varialbles

2001-12-06 Thread Alex Shi

Hi,

I have a question about how we can read environment variables. In perl we
can
do this as following:

$caller = $ENV{'HTTP_REFERER'};
$doc_name = $ENV{'DOCUMENT_NAME'};
$visitor_ip = $ENV{'REMOTE_ADDR'};
$visitor_host = $ENV{'REMOTE_HOST'};

Actually in Perl, either SSI or CGI, we can get all the environment
variables.

How can we do the same thing in PHP?

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Trying to pass a variable through a form...

2001-12-06 Thread Alex Shi

Can you paste Tnoy2.php script? Please make sure in Tony2.php $name
is printed but not $lname.

Alex

- Original Message -
From: "Anthony Ritter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:01 AM
Subject: [PHP] Trying to pass a variable through a form...


> I'm trying to pass a variable from a form text box into a php file
> (Tony1.php).
>
> Then, I'd like to click on a link in the Tony1.php page and get the
> Tony2.php page to load with the original variable -$lname - printed on the
> next page (Tony2.php).
>
> The Tony2.php loads when I click the link but the value from the variable
is
> not printed.
>
> Any help would be greatly appreciated.
> The code is below.
> Tony Ritter
> ...
>
>
> file://TonyForm.html//
>
> 
> 
> Name:  
> 
> 
> 
>
> .
> file://Tony1.php//
>
>  echo ("Welcome $lname");
> ?>
>  Link 
>
>
> ...
> file://Tony2.php//
>
> Hello
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Redirect Function?!!

2001-12-06 Thread Alex Shi

You can use,

header ("Location: http://www.php.net";);

and you can pass variable,

header ("Location: http://www.php.net?name1=$value&$name2=$value2";);

Hope this can helps.

Alex Shi


- Original Message -
From: "Cam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:22 AM
Subject: [PHP] Redirect Function?!!


> Anyone know of a way to redirect to another page with PHP?  I'm aware of
the
> META tag redirection via the HTTP header, but I really need a more elegant
> solution that redirects immediately without relying on any HTML tags.
> Appreciate the help,
> -C
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Is there a GUI for MySQL?

2001-12-06 Thread Alex Shi

http://phpwizard.net/projects/phpMyAdmin/  -- this is a great admin tool
through web

http://www.mysql.com/downloads/gui-mysqlgui.html -- you can find screenshot
there,
looks ugly

- Original Message -
From: "Hai Nguyen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:31 AM
Subject: [PHP] Is there a GUI for MySQL?


> Hi,
>
> I am a newbie at this.  I was just wondering if there is a Graphical
> User Interface for MySQL?
>
> Cheers,
>
> Hai Nguyen
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Comparing Dates

2001-12-08 Thread Alex Shi

Absolutely you are doing in the right way:) But pls make sure that
string comparison is from left to right. For example, "16" is larger
than "15-12-01".

Alex


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 8:16 PM
Subject: [PHP] Comparing Dates


I'm trying to do a check on a date, to see if it's after the current date,
so basically i'm doing an

if(date("d-m-y")>"15-12-01") { do something }

I know that's obviously not the right way to do it, but can someone help me
out?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to compute time to load page...

2001-12-08 Thread Alex Shi

Basically I agree with you. But the second time to get time must be done
after the page is rendered on local browser. So I suggest to use Javascript
for the second time to get time, and pass the first time value into a js
function.

Alex


- Original Message -
From: "Andrew Forgue" <[EMAIL PROTECTED]>
To: "Jack Dempsey" <[EMAIL PROTECTED]>; "Torkil Johnsen"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 9:42 PM
Subject: Re: [PHP] How to compute time to load page...


> Or this:
>
> at the beginning of your script, get the time using microtime
> then at the bottom, you could  get the time again, subtract
> the difference and voila, thats how long the execution time
> of your script is.
>
> -ajf
>
> - Original Message -
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Saturday, December 08, 2001 7:59 PM
> Subject: RE: [PHP] How to compute time to load page...
>
>
> > the search time is different than the page load timegoogle for
example
> > can find thousands of records in a tenth of a second, yet it takes
longer
> to
> > get that html result back to your browseryou could estimate page
> > download time by calculating the filesize and using the connection
> > speedcertainly not 100% accurate, but it will give you a way of
> > estimating.
> >
> > jack
> >
> > -Original Message-
> > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, December 08, 2001 7:14 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] How to compute time to load page...
> >
> >
> > Hi All... (again)
> >
> > I was just wondering if anyone out there has made a function that will
> > compute how long time (seconds, milliseconds) it will take to load a
page?
> >
> > I see some search engines have a function that displays how long time
the
> > search took, and I'm looking for the same thing, to compare different
> > designs and improve loading time for my "viewers".
> >
> > Anyone?
> > - Torkil Johnsen
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to compute time to load page...

2001-12-08 Thread Alex Shi

This is an Einstein problem :)) Maybe we need a time server 

However, we can have an alternative solution to get round turn time.
Let's say on page A there's a link to a backend script. When the link
is clicked, then use javascript to pick up current time T1 and pass it to
the script. This script will send a page back to browser. Let's say this
is page B. Time T1 is passed to the js of page B. And at the end of
page B a js function will pick up current time T2. When the page
rendered at local browser, we have both T1 and T2. Thus we calculate
the time difference of a round turn. I know it is not a final solution
but this is acurate.

Hope someone else out there can give better solution.

Alex


- Original Message -
From: "Jason G." <[EMAIL PROTECTED]>
To: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 11:42 PM
Subject: Re: [PHP] How to compute time to load page...


> What about the small difference there will be between server time and
local
> time?
> -Jason Garber
>
> At 10:40 PM 12/8/2001 -0500, Alex Shi wrote:
> >Basically I agree with you. But the second time to get time must be done
> >after the page is rendered on local browser. So I suggest to use
Javascript
> >for the second time to get time, and pass the first time value into a js
> >function.
> >
> >Alex
> >
> >
> >- Original Message -
> >From: "Andrew Forgue" <[EMAIL PROTECTED]>
> >To: "Jack Dempsey" <[EMAIL PROTECTED]>; "Torkil Johnsen"
> ><[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> >Sent: Saturday, December 08, 2001 9:42 PM
> >Subject: Re: [PHP] How to compute time to load page...
> >
> >
> > > Or this:
> > >
> > > at the beginning of your script, get the time using microtime
> > > then at the bottom, you could  get the time again, subtract
> > > the difference and voila, thats how long the execution time
> > > of your script is.
> > >
> > > -ajf
> > >
> > > - Original Message -
> > > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > > To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > Sent: Saturday, December 08, 2001 7:59 PM
> > > Subject: RE: [PHP] How to compute time to load page...
> > >
> > >
> > > > the search time is different than the page load timegoogle for
> >example
> > > > can find thousands of records in a tenth of a second, yet it takes
> >longer
> > > to
> > > > get that html result back to your browseryou could estimate page
> > > > download time by calculating the filesize and using the connection
> > > > speedcertainly not 100% accurate, but it will give you a way of
> > > > estimating.
> > > >
> > > > jack
> > > >
> > > > -Original Message-
> > > > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> > > > Sent: Saturday, December 08, 2001 7:14 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] How to compute time to load page...
> > > >
> > > >
> > > > Hi All... (again)
> > > >
> > > > I was just wondering if anyone out there has made a function that
will
> > > > compute how long time (seconds, milliseconds) it will take to load a
> >page?
> > > >
> > > > I see some search engines have a function that displays how long
time
> >the
> > > > search took, and I'm looking for the same thing, to compare
different
> > > > designs and improve loading time for my "viewers".
> > > >
> > > > Anyone?
> > > > - Torkil Johnsen
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help!

2001-12-09 Thread Alex Shi

Have the page expired at once!

Alex

- Original Message -
From: "ryan adorable" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 09, 2001 10:07 AM
Subject: [PHP] Help!


> Hi,
>
>I created a poll program for my homepage. When i vote some field in my
database gets incremented, but after successfully voting when i clicked on
reload/refresh of my browser the said field is also incremented. How can I
fix/avoid this problem?
>
>Hoping for a reply.
>Thanks
>
> Ryan
>
> _
> Sign up for FREE email from FloppyDisk at http://www.floppydiskonline.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HEX value for str variable

2001-12-12 Thread Alex Shi

Hello,

For some reason I need to test Hex value in a string variable. 
Could any one here help me out how to write one or more hex 
values into a string variable?

Thanks!

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Script like this for PHP

2001-12-12 Thread Alex Shi

Javascript.

- Original Message -
From: "Indera" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 12, 2001 4:01 AM
Subject: [PHP] Script like this for PHP


> Hello,
>
> I came across this FAQ and I really would like to create my FAQ like this
one. I was wondering if
> someone would take a look at this link and let me know how it's created. I
looked at the code, but
> can't figure out how it's done.
>
> http://www.installshield.com/ds/info/generalqa.asp
>
> Thanks
> Indera
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Logo proposal - voting script!

2001-12-13 Thread Alex Shi

Really? It seems perfect from my end (IE5.5/Win2K)..



> I got the same error...
>
> --- R'twick Niceorgaw <[EMAIL PROTECTED]> wrote:
> > While voting I got this error
> >
> > Warning: Cannot add header information - headers already sent by
> > (output
> > started at /home/b1642/public_html/vote/logo.php:6) in
> > /home/b1642/public_html/vote/logo.php on line 49
> >
> > - Original Message -
> > From: "Michael Cronström" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, December 13, 2001 12:55 PM
> > Subject: [PHP] Logo proposal - voting script!
> >
> >
> > > OK guys,
> > >
> > > a voting script!
> > >
> > > at: http://zoon.se/vote/logo.php
> > >
> > > try it :)
> > >
> > > Michael Cronstrom
> > > Web Inventor
>
>
>
> =
> work: 800-873-0078x7218
> cell: 214-673-1468
> home: 972-641-5535
>
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Hello, folks!

I installed PHP4 on Windows 98 with PWS4. When I try to
run a very simple script, I got a just one line error message 
"One of the library files needed to run this application cannot 
be found". The script is very simple: "", so
I don't think the error has anything to do with it. Anyone has
idea what's wrong with it? Please help me out if you know
this issue. Thanks in advance!

Alex Shi



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Now I set extension_dir point to correct path in php.ini, the 
problem changed: it shows 500 internal server error.


- Original Message - 
From: "Alex Shi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 5:51 PM
Subject: [PHP] PHP4 on Windows98 with PWS4


> Hello, folks!
> 
> I installed PHP4 on Windows 98 with PWS4. When I try to
> run a very simple script, I got a just one line error message 
> "One of the library files needed to run this application cannot 
> be found". The script is very simple: "", so
> I don't think the error has anything to do with it. Anyone has
> idea what's wrong with it? Please help me out if you know
> this issue. Thanks in advance!
> 
> Alex Shi
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Alex Shi

Thank you!

I copied all the .dlls and point extension_dir to corrent path...Okay,
the "library file not found" problem seems fixed but now the problem
changed to 500 internal server error! I typed "php -i" from dos shell
and it print correct html code. And I tried both cgi and isapi mode
but got same error. It seems like this must be a web server config
problem but I don't how to find out a clue.

Alex



- Original Message -
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 6:52 PM
Subject: Re: [PHP] PHP4 on Windows98 with PWS4


> make sure you copy all the correct dll's into the c:\windows\system or
> system32 directory.  the dll's have to be in a location that is included
in
> the window PATH in the autoexec.bat
> Jim
> - Original Message -
> From: "Alex Shi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 18, 2001 2:51 PM
> Subject: [PHP] PHP4 on Windows98 with PWS4
>
>
> > Hello, folks!
> >
> > I installed PHP4 on Windows 98 with PWS4. When I try to
> > run a very simple script, I got a just one line error message
> > "One of the library files needed to run this application cannot
> > be found". The script is very simple: "", so
> > I don't think the error has anything to do with it. Anyone has
> > idea what's wrong with it? Please help me out if you know
> > this issue. Thanks in advance!
> >
> > Alex Shi
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] List all session currently associated with a web site

2001-12-20 Thread Alex Shi

Hi,

I 'd like to know how can we list all the sessions concurrently
active on a web site. If anyone out there knows how to do the
trick please help. Thanks in advance!

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to check if a session exists

2001-12-20 Thread Alex Shi

If a sesson_id is known, how can check if the session exists?

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question about mail()

2001-09-04 Thread Alex Shi

Hi, 

I have a question regarding to mail() function:
Does mail() function use sendmail, or just use a mail program of php?
If it uses a mail program other than sendmail, how can configure it to
work correctly?

Alex


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: problem with ereg() and ereg_replace()

2001-09-04 Thread Alex Shi

Yes, you are right, when add backslashes it works. But I really
don't understand why ereg()/ereg_replace behaves differently on
different servers...

Alex


- Original Message -
From: "CC Zona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 01, 2001 11:59 PM
Subject: [PHP] Re: problem with ereg() and ereg_replace()


> In article <01b201c13354$0ca601c0$0105050a@pony>,
>  [EMAIL PROTECTED] (Stonix) wrote:
>
> > ereg_replace( "{key}", "word", $a_string);
> >
> > The web server will return following warnning msg:
> >
> > Warning: Invalid content of \{\} in /var/www/html/scrip.php on line #
>
> In regex, the curly braces are special characters used to define the
number
> of repetitions to be matched, either as an exact number or as a range.
>
> "a{2}" #"aa"
> "abc(2,3}" #"abcabc" or "abcabcabc"
> "abc{,2}" #"","abc", or "abcabc"
>
> Are you trying to match the literal string "{key}"?  'Cuz if so, you might
> as well just use str_replace since you're not really in need of ereg_*'s
> special pattern matching.  If you're trying to match a special character
> with a regex, don't forget to either escape it or put it in a character
> class:
>
> ereg_replace( "\{key\}", "word", $a_string);
> ereg_replace( "[{]key[}]", "word", $a_string);
>
> --
> CC
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with header()

2001-09-04 Thread Alex Shi

Hi,

Can anyone tell me why header() cannot been used after any network
operation?

In my script, there are following steps:

1).a socket is opened for smtp; 
2).send email;
3).closed the socket; 
4).use header() to redirect to another page. 

If no 1), 2) and 3), 4) can be processed without any problem. But if 
socket steps added, system will send warning message: Cannot add 
header information - headers already sent by ( output started at.)

So, it seems like fsockopen will cause a header to be sent and other 
header cannot been sent after that within same scritp even though
the socket is closed. Now my question is how can the second header
been sent?

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] what does this line means? Many thanks

2001-09-05 Thread Alex Shi

strstr($str, $needle) returns a substr start from first occurance of $needle
in $str to the end of $str.

strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","") :
$SBMT_CNDTNS[] = $value;

equivalent to:

if( strstr($value, "VLD:") !="" ) {
$VLD_CNDTNS[] = strtr($value,"VLD:","");
} else {
$SBMT_CNDTNS[] = $value;
}

This kind of express is borrowed from C.

Alex


- Original Message - 
From: "Sall Him" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 3:35 PM
Subject: [PHP] what does this line means? Many thanks


> strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","") :
> $SBMT_CNDTNS[] = $value;
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] what does this line means? Many thanks

2001-09-05 Thread Alex Shi

In following formular,

exp ? statement1 : statement2

if exp is true, statement1 is excuted, else statement2 is excuted.
So it is equivalent to:

if( exp ) {
   statement1
} else {
   statement2
}

If you still want to ask what "?" means, I think it can be "if exp is true".

Alex


- Original Message -
From: "Sall Him" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 4:44 PM
Subject: Re: [PHP] what does this line means? Many thanks


> thanks, another question is what does the ? means in this line?
>
> Alex Shi wrote:
> >
> > strstr($str, $needle) returns a substr start from first occurance of
$needle
> > in $str to the end of $str.
> >
> > strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","") :
> > $SBMT_CNDTNS[] = $value;
> >
> > equivalent to:
> >
> > if( strstr($value, "VLD:") !="" ) {
> > $VLD_CNDTNS[] = strtr($value,"VLD:","");
> > } else {
> > $SBMT_CNDTNS[] = $value;
> > }
> >
> > This kind of express is borrowed from C.
> >
> > Alex
> >
> > - Original Message -
> > From: "Sall Him" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 05, 2001 3:35 PM
> > Subject: [PHP] what does this line means? Many thanks
> >
> > > strstr($value,"VLD:") != "" ? $VLD_CNDTNS[] = strtr($value,"VLD:","")
:
> > > $SBMT_CNDTNS[] = $value;
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Accelerator cache update

2001-09-05 Thread Alex Shi

It seems like GRANITECANYON.COM temporarily down, so your
domain cannot be resolved.


- Original Message -
From: "PHP Accelerator" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 6:55 PM
Subject: [PHP] PHP Accelerator cache update


> A new version of the free PHP Accelerator for Linux is now available at
> www.php-accelerator.co.uk
>
> This release offers a substantial performance improvement over the first
> 'proof of concept' version, and initial performance tests show that the
> Accelerator now delivers approximately the same performance as the Zend
> Cache.
>
> Nick
>
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTML mail

2001-09-06 Thread Alex Shi

Hi Sid,

Following link is an article about sending MIME email in php:
http://www.phpbuilder.com/columns/kartic2807.php3

But I think it is too complicated for me to read:((.  I suggest you
can try following instead:


$email_address="[EMAIL PROTECTED]";
$subject="anything you can do";
$email_contents="HTML test: write your HTML tags here";
$tips="Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 7bit";
mail($email_address,$subject,$email_contnets,$tips);


here $tips is the key for html mail.

Hope this can help.

Alex

- Original Message -
From: "Sid" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 06, 2000 11:32 AM
Subject: [PHP] HTML mail


> hi,
> How would you send HTML mail using the mail() function in PHP.
> SID
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Call a script without a return

2001-09-18 Thread Alex Shi

Hi,

I know my question might be a little bit strange but I am really 
thinking for the posiblity. 

Suppose we have a page and on it a button link to a backend
script. When click the button, at the server side the scritp will
be called. My question is, how can we program the script that
just let to do something on server but not to send out a return
to browser, so at client end the page will be stay unchanged.

Can any one here have an idea how to do this?

Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Showing up variables in URL !

2001-09-18 Thread Alex Shi

Try this:



Alex

- Original Message -
From: "Arcadius A." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 6:14 AM
Subject: [PHP] Showing up variables in URL !


> Hello !
> We all know how to pass value to variable using an URL.
> So, how can I do the inverse ?
> I mean , showing the value of a variable in the URL?
>
> for instance  my page "index.php" is :
>
>  $greetings="Hello" ;
> echo $greetings ;
>  ?>
>
> So, how to make PHP so that when I load my page in the browser(typing
> "index.php" in the adress bar) , it will print not only "hello" on the
> page,but also show "index.php?greetings=hello"   as URL  , So , I
> basically want PHP to dynamically append  "?greetings="  to
> the URL I've typed
>
> How to do this ?
> I hope I've made myself understood ... :o)
>
> Thanks...
>
> Arcad.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >