[PHP] what is the PHP equivalent of Transactional ASP page

2002-11-17 Thread See Kok Boon
hi people,

just want to know if there such a thing as a Transactional PHP Page and who
do i go about setting up a page like this?

for those who don't know about ASP, a Transactional ASP page is able to
reverse its operations. it is used mainly in ecommerce, in a page where the
transaction is carried out.

the reason for this is so that if for example,

you click checkout to buy a downloaded software -> the software removed from
shopping cart -> money is deducted from your credit card -> the download
page appears -> the lightning strikes -> your internet connection gone ->
the download page expires ...

if i don't use a Trasactional Page, i will keep the money without having to
give my customer the software, which is good!!! lol but not for my customer.
so the Transactional Page will then detect that the lightning has striked...

... -> transactional page realize that the transaction is not completed ->
the money is returned to the credit card -> the software back to the
shopping cart -> i wait for the customer to fix the computer and return

And that is a transactional page. so can i also do that in PHP?

Yours sincerely,
See Kok Boon
Realize Creations
http://www.realizecreations.com
---
looking for - jobs? career? customer?
look in realPortal!
http://realportal.realizecreations.com


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




Re: [PHP] what is the PHP equivalent of Transactional ASP page

2002-11-17 Thread Rasmus Lerdorf
That's what you use a database transaction for,  It does not belong at the
scripting language level.  PHP is built to be scalable, and as such the
various requests that make up the "transaction" can come in on different
processes and different machines even.  The shopping cart data has to live
in a central storage somewhere and in order to support rollback on these
transactions this central data store must support that.

-Rasmus

On Sun, 17 Nov 2002, See Kok Boon wrote:

> hi people,
>
> just want to know if there such a thing as a Transactional PHP Page and who
> do i go about setting up a page like this?
>
> for those who don't know about ASP, a Transactional ASP page is able to
> reverse its operations. it is used mainly in ecommerce, in a page where the
> transaction is carried out.
>
> the reason for this is so that if for example,
>
> you click checkout to buy a downloaded software -> the software removed from
> shopping cart -> money is deducted from your credit card -> the download
> page appears -> the lightning strikes -> your internet connection gone ->
> the download page expires ...
>
> if i don't use a Trasactional Page, i will keep the money without having to
> give my customer the software, which is good!!! lol but not for my customer.
> so the Transactional Page will then detect that the lightning has striked...
>
> ... -> transactional page realize that the transaction is not completed ->
> the money is returned to the credit card -> the software back to the
> shopping cart -> i wait for the customer to fix the computer and return
>
> And that is a transactional page. so can i also do that in PHP?
>
> Yours sincerely,
> See Kok Boon
> Realize Creations
> http://www.realizecreations.com
> ---
> looking for - jobs? career? customer?
> look in realPortal!
> http://realportal.realizecreations.com
>
>
> --
> 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] I'm in need of a PHP web host recommendation

2002-11-17 Thread John Lim
I would recommend http://futurequest.net

Good, reliable, and very skilled technical people, who know linux and
web-hosting inside out.

"John Kenyon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Jason Reid wrote:
>
> >I suggest paying a visit to www.webhostingtalk.com and search the
forums... theres tons of information on the large, and small hosts that
might help.
> >
>
> I use www.phpwebhosting.com and have been happy with them so far. $10 a
> month, but they are generous (and flexible, at least so they say) about
> space and bandwidth.
>
> jck
>



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




Re: [PHP] what is the PHP equivalent of Transactional ASP page

2002-11-17 Thread Justin French
I don't know if the 'transaction' page could really determine if the
download was *completed* -- perhaps if it was *started*...

>From what I can tell, most online s/ware purchases are done in two ways:

1. free download / demo which can be 'unlocked' with a key, which is
provided upon payment... rather than giving them a download address upon
payment, give them a key.

2. provide a link to the downloadable file upon payment.  i've seen this
done on the cheap ("here's the URL, please don't tell you friends!!") and
done properly (A certain user is given access to the downloadable file for a
certain period [eg 5 days]) -- I buy a little bit of stock photography, and
from what I can tell i'm allowed to download it over and over, since I
paid... I'm not sure what's stopping me from telling my friends my password,
but the same argument can be made for option #1... I could tell my friends
the unlock code.

But, I'm getting OT... :)


Justin


on 17/11/02 6:09 PM, See Kok Boon ([EMAIL PROTECTED]) wrote:

> hi people,
> 
> just want to know if there such a thing as a Transactional PHP Page and who
> do i go about setting up a page like this?
> 
> for those who don't know about ASP, a Transactional ASP page is able to
> reverse its operations. it is used mainly in ecommerce, in a page where the
> transaction is carried out.
> 
> the reason for this is so that if for example,
> 
> you click checkout to buy a downloaded software -> the software removed from
> shopping cart -> money is deducted from your credit card -> the download
> page appears -> the lightning strikes -> your internet connection gone ->
> the download page expires ...
> 
> if i don't use a Trasactional Page, i will keep the money without having to
> give my customer the software, which is good!!! lol but not for my customer.
> so the Transactional Page will then detect that the lightning has striked...
> 
> ... -> transactional page realize that the transaction is not completed ->
> the money is returned to the credit card -> the software back to the
> shopping cart -> i wait for the customer to fix the computer and return
> 
> And that is a transactional page. so can i also do that in PHP?
> 
> Yours sincerely,
> See Kok Boon
> Realize Creations
> http://www.realizecreations.com
> ---
> looking for - jobs? career? customer?
> look in realPortal!
> http://realportal.realizecreations.com
> 

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




[PHP] Re: POSIX and PCRE help

2002-11-17 Thread Aaron
In what case would you have a semi-colon in the string?


"Orangehairedboy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Aaron,
>
> Thanks for the advise, but I'm got a problem. If I first split it up by
/;/,
> how do I catch it if there's a semi-colon inside a string?
>
> Lewis
>
>
> "Aaron" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Lewis,
> >
> > First I would look at breaking out the tags:
> >
> > // User: JohnDoe; age=32; nickname="Billy 'the' Kid";
> haircolor=orange;
> >
> > $string = 'User: JohnDoe; age=32; nickname="Billy \'the\' Kid";
> > haircolor=orange;';
> > $stringArray = preg_split('/;/', $string, -1, PREG_SPLIT_NO_EMPTY);
> >
> > Then split by the = or :
> >
> > // split by = or :
> >
> > foreach ($stringArray as $item) {
> > list($tag, $element) = preg_split('/\:|\=/', $item, 1,
> > PREG_SPLIT_NO_EMPTY);
> > echo "$tag => $element";
> > }
> >
> > -aaron
> >
> > "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I am trying to learn more about regular expressions as I haven't used
> them
> > > much in the past. I am working with email, and I'm looking for a way
to
> > > split the following expression up:
> > >
> > > Content-Type: text/plain; boundary="whatever";
> > >
> > > Using   "/^(\S+)\:\s*(.+)$/iU"   I can split it into:
> > >
> > > [Content-Type] and [text/plain; boundary="whatever";]
> > >
> > > Problem is, it might have different tags. Here's a sketch of the whole
> > > thing:
> > >
> > > [Header Name a-zA-Z0-9] [\s*] [:] [\s*] [ Header value a-zA-Z0-9/_ ]
> [\s*]
> > > [;] [ unlimited repeating pattern of ( [Property Name a-zA-Z0-9] [\s*]
> [=]
> > > [\s*] ( string optionally surrounded by quotes - but necessary if
value
> > has
> > > spaces - but can't include quotes ) [\s*] [;] ) ]
> > >
> > > So, if I had:
> > >
> > > User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange;
> > >
> > > I would need:
> > >
> > > User - "JohnDoe" - age - "32" - nickname - "Billy 'the' Kid" -
> haircolor -
> > > "orange"
> > >
> > > in the outputted array. I have no idea how to do repeating patterns
like
> > > this...maybe I'm making this too complex?
> > >
> > > Thanks for your help!
> > >
> > > Lewis
> > >
> > >
> >
> >
>
>



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




[PHP] post files array and registered globals off

2002-11-17 Thread electroteque
hi i need to do a foreach on post files array ie



_REQUEST['photo'] or _POST['photo'] doesnt work

only _FILES['photo'] works and if i do a foreach on this it gets the 5
associated array values for it not on the input value array ? say i had 2
input files i should get a count of 2 not 5 :|



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




Re: [PHP] Display cell if dates are between 2 dates - help

2002-11-17 Thread Ray Healy \(Data Net Services\)
Dear Jason

The startdate and endate columns are "date" format - have any ideas what i
can do

Thanks for yout help

Ray
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 6:22 AM
Subject: Re: [PHP] Display cell if dates are between 2 dates - help


> On Sunday 17 November 2002 04:10, Ray Healy \(Data Net Services\) wrote:
> > Dear all
> >
> > I'm trying to create a search function that can check the current day in
a
> > calendar against a mysql database where there is a startdate and enddate
> > and if the date is there then colour code the cell in the calendar.
> >
> > I have tried to use the following command
> >
> > $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday'
> > BETWEEN startdate AND enddate;";
> >
> > The database has an ID - title - startdate - enddate
>
> What types are the columns 'startdate' and 'enddate'?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> You're ugly and your mother dresses you funny.
> */
>
>
> --
> 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] PHP search engines

2002-11-17 Thread Phil Schwarzmann
So I would like to make a search engine for my site.  Can you use PHP to
do this?  Or is another language/application/whatever more appropriate??
If so, can you give me links to where I can find information on this
topic.
 
Thanks!!



Re: [PHP] PHP search engines

2002-11-17 Thread [EMAIL PROTECTED]
Hello!

PS> So I would like to make a search engine for my site.  Can you use PHP to
PS> do this?  Or is another language/application/whatever more appropriate??
PS> If so, can you give me links to where I can find information on this
PS> topic.

http://php.net/mnogo
http://mnogosearch.org

=
Heilig (Cece) Szabolcs - [EMAIL PROTECTED] - http://www.phphost.hu
=



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




RE: [PHP] PHP search engines

2002-11-17 Thread Richard Pijnenburg
I have created my own search engine. It searches in a mysql database,
sins all the text from the site is in the database.

Richard Pijnenburg
Klik-on Internet Solutions


> -Original Message-
> From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 11:59 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP search engines
> 
> So I would like to make a search engine for my site.  Can you use PHP
to
> do this?  Or is another language/application/whatever more
appropriate??
> If so, can you give me links to where I can find information on this
> topic.
> 
> Thanks!!


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




RE: [PHP] PHP search engines

2002-11-17 Thread Khalid El-Kary
hi,

It depends on the data storage system you use, and the more you get deeper 
with it the more you get it more customized for your own site, i mean that 
when you do it with the natural PHP APIs it's better rather than obtaining a 
ready-made search system, however if you want to use a ready-made one check 
ht://Dig(http://www.htdig.org/), it's the one used by PHP.net in the site 
search (whole site search) ... good search :)

khalid



_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



[PHP] gd library

2002-11-17 Thread A3-Mail Proxy Handler
Hi,
I am trying to add gd support to my php configuration. But I could not
manage...

Here is the versions:
php 4.2.3, gd 2.0.7, slackware 8.1, apache 1.3.27

in the make of php, php gives error with gd librarys...
(sorry, I cannot give errors now, I cannot simulate the situation for now)

Is this a known issue?
Does this happens to everyone?
Should I add something different during configure?
(I used only --with-gd)

Thanks...


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




[PHP] Calling $PATH_INFO

2002-11-17 Thread Mr. BuNgL3
I'm with a little problem... i have this php code and when i lick F5
(refresh) it keeps adding files do database... i think "if ($Submit)" is not
doing what i want! My propose is clicking on submit it adds me the
$titulotxt and $cds to the database using $PATH_INFO. How must i do to
resolve my problem?
Thanks : )

if ($Submit)
{
 $ligacao=mysql_connect("localhost","nac31915","alanis") or die
(mysql_error());
 $sql="INSERT INTO divxtemp (titulo,cds) VALUES ('$titulotxt','$cdstxt')";
 if ($ligacao)
 {
  mysql_db_query("DB_nac31915",$sql) or die (mysql_error());
 }
 mysql_close();
}
?>




 Adicionar Novo(s) Filme



 
  Adicionar
Filme
  
   

 Título:
 Cds:
  
   


  
   
 


   
  
 
 
 






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




[PHP] Re: POSIX and PCRE help

2002-11-17 Thread OrangeHairedBoy
Probably none of the standard headers, but perhaps a custom header defined
by the user. It's allowed for in RFC 822 and I'd like to support it.

Why do you ask? Do you have a solution?


"Aaron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In what case would you have a semi-colon in the string?
>
>
> "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Aaron,
> >
> > Thanks for the advise, but I'm got a problem. If I first split it up by
> /;/,
> > how do I catch it if there's a semi-colon inside a string?
> >
> > Lewis
> >
> >
> > "Aaron" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Lewis,
> > >
> > > First I would look at breaking out the tags:
> > >
> > > // User: JohnDoe; age=32; nickname="Billy 'the' Kid";
> > haircolor=orange;
> > >
> > > $string = 'User: JohnDoe; age=32; nickname="Billy \'the\' Kid";
> > > haircolor=orange;';
> > > $stringArray = preg_split('/;/', $string, -1,
PREG_SPLIT_NO_EMPTY);
> > >
> > > Then split by the = or :
> > >
> > > // split by = or :
> > >
> > > foreach ($stringArray as $item) {
> > > list($tag, $element) = preg_split('/\:|\=/', $item, 1,
> > > PREG_SPLIT_NO_EMPTY);
> > > echo "$tag => $element";
> > > }
> > >
> > > -aaron
> > >
> > > "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > I am trying to learn more about regular expressions as I haven't
used
> > them
> > > > much in the past. I am working with email, and I'm looking for a way
> to
> > > > split the following expression up:
> > > >
> > > > Content-Type: text/plain; boundary="whatever";
> > > >
> > > > Using   "/^(\S+)\:\s*(.+)$/iU"   I can split it into:
> > > >
> > > > [Content-Type] and [text/plain; boundary="whatever";]
> > > >
> > > > Problem is, it might have different tags. Here's a sketch of the
whole
> > > > thing:
> > > >
> > > > [Header Name a-zA-Z0-9] [\s*] [:] [\s*] [ Header value a-zA-Z0-9/_ ]
> > [\s*]
> > > > [;] [ unlimited repeating pattern of ( [Property Name a-zA-Z0-9]
[\s*]
> > [=]
> > > > [\s*] ( string optionally surrounded by quotes - but necessary if
> value
> > > has
> > > > spaces - but can't include quotes ) [\s*] [;] ) ]
> > > >
> > > > So, if I had:
> > > >
> > > > User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange;
> > > >
> > > > I would need:
> > > >
> > > > User - "JohnDoe" - age - "32" - nickname - "Billy 'the' Kid" -
> > haircolor -
> > > > "orange"
> > > >
> > > > in the outputted array. I have no idea how to do repeating patterns
> like
> > > > this...maybe I'm making this too complex?
> > > >
> > > > Thanks for your help!
> > > >
> > > > Lewis
> > > >
> > > >
> > >
> > >
> >
> >
>
>



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




[PHP] Re: Calling $PATH_INFO

2002-11-17 Thread OrangeHairedBoy
When you press F5 it's probably resubmitting the contents of the form,
including the value of the submit button. You might want to use sessions to
control what they submit, and how ofter they submit on the server side.

Lewis


"Mr. Bungl3" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm with a little problem... i have this php code and when i lick F5
> (refresh) it keeps adding files do database... i think "if ($Submit)" is
not
> doing what i want! My propose is clicking on submit it adds me the
> $titulotxt and $cds to the database using $PATH_INFO. How must i do to
> resolve my problem?
> Thanks : )
>
> if ($Submit)
> {
>  $ligacao=mysql_connect("localhost","nac31915","alanis") or die
> (mysql_error());
>  $sql="INSERT INTO divxtemp (titulo,cds) VALUES ('$titulotxt','$cdstxt')";
>  if ($ligacao)
>  {
>   mysql_db_query("DB_nac31915",$sql) or die (mysql_error());
>  }
>  mysql_close();
> }
> ?>
>
> 
> 
> 
>  Adicionar Novo(s) Filme
> 
>
> 
>   bordercolor="#00">
>face="Courier New, Courier, mono">Adicionar
> Filme
>   
> id="divxadd">
> 
>  Título: name="titulotxt" type="text" id="titulotxt">
>  Cds:
>   
> type="text" id="cdstxt"> name="Submit" value="Adicionar">
>
>
>   
>
>  
> 
>
>
>   
>  
>  
> include('addlist.php');
>  ?>
>
> 
> 
>
>



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




Re: [PHP] Searching a Table

2002-11-17 Thread Stephen
http://www.melchior.us is not the site I am talking about. The site I'm
talking about is not yet up.


- Original Message -
From: "Rick Widmer" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Sent: Saturday, November 16, 2002 11:56 PM
Subject: Re: [PHP] Searching a Table


> At 10:40 PM 11/16/02 -0500, you wrote:
>
> http://www.melchior.us
>
> I recently tried hitting your web site with Netscape 7.0, and it would not
> let me in.
>
> Also, it is usually best to send only plain text to mailing lists.  The
> fine print you are using is very hard to read.
>
>
> Rick
>
>


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




[PHP] How do I get email address of sender

2002-11-17 Thread AKHIL KODALI
Hi,

How to I get from e-mail address using imap function.
I was able to retrieve the name only.

imap_fetch_overview doesn't provide this facility.

-- 
AKHIL K
200101009
Room No. 15
BH-2
IIIT
--

Look at me. My life has no meaning or direction, and I'm happy



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




[PHP] error handling

2002-11-17 Thread Mattia
When the display_errors is Off, and the output of the page comes all in the
end, or when you're using some template engine or some output buffer
function (ob_start()), no output is displayed to the screen! I would like to
tell a message to the use in case of failure of the scripy, without giving
the information of the kind of error it is.

Display a message like: the application has caused an error! the webmaster
has been notified by email.

And the precise error in the error log, like: Parse error in line  file


Is there anythig to do it without setting up a custom error log?

thanks
Mattia



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




[PHP] preg_match_all - how does it work?

2002-11-17 Thread Randall Perry
I have some experience in using regular expressions in Perl, and have been
able to use preg_match in php, but am having a problem with preg_match_all.

I'm trying to extract data from an HTML table. Here's my preg_match call
that correctly grabs the 1st row of data in the table. It grabs 4 columns of
data:

preg_match("|(.*?)<.+?(.*?)<.+?(.*?)<.*?[ ]*(.*?).*?|", $res, $match);

If I use preg_match_all on the same table:
preg_match_all("|(.*?)<.+?(.*?)<.+?(.*?)<.*?[ ]*(.*?).*?|", $res, $match, PREG_PATTERN_ORDER);

...and try to print output, I get:

$match[0] = Array
$match[0][0] = Array[0]
$match[1][0] = Array[0]
$match[0][1] = Array[0]
$match[1][1] = Array[0]


Same result with PREG_SETORDER.

What am I doing wrong?

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



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




Re: [PHP] Searching a Table

2002-11-17 Thread Stephen
Thanks, this is what I was looking for. But does it ommit common words like
'it' or 'the?'


- Original Message -
From: "Marco Tabini" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, November 16, 2002 10:47 PM
Subject: Re: [PHP] Searching a Table


> Ok, then you can use FULLTEXT queries.
>
> Take a look here:
>
> http://www.mysql.com/doc/en/Fulltext_Search.html
>
>
> Marco
>
> On Sat, 2002-11-16 at 22:49, Stephen wrote:
> > I don't have control of my server, it's hosted. All my content is in a
MySQL
> > database and is outputed through a php page that selects the information
> > from an id variable passed through the URL...
> >
> >
> > - Original Message -
> > From: "Marco Tabini" <[EMAIL PROTECTED]>
> > To: "Stephen" <[EMAIL PROTECTED]>
> > Cc: "PHP List" <[EMAIL PROTECTED]>
> > Sent: Saturday, November 16, 2002 10:38 PM
> > Subject: Re: [PHP] Searching a Table
> >
> >
> > > Well, if you're using a database, say MySQL, you can look at FREETEXT
> > > indexes and queries. If you want to index your web pages, you should
be
> > > looking at a search engine that works with your web server. For
example,
> > > ht:dig (http://www.htdig.org/) works with Apache.
> > >
> > >
> > > Marco
> > >
> > > --
> > > 
> > > php|architect - The magazine for PHP Professionals
> > > The first monthly worldwide magazine dedicated to PHP programmers
> > > Check us out on the web at http://www.phparch.com
> > >
> > >
> > >
> > > On Sat, 2002-11-16 at 22:40, Stephen wrote:
> > > > I need to make a search engine for my site. Instead of making a
table
> > with all the words of my content of my reviews, I need to make it
simple.
> > How could you search a table of articles (let's say game_reviews) by
> > comparing keywords the user types in, to the text of the article? All
the
> > tutorials I can find make a table with a list of words of every single
> > keyword...
> > > >
> > > >
> > > > Thanks,
> > > > Stephen Craton
> > > > http://www.melchior.us
> > > >
> > > > "Life is a gift from God. Wasting it is like destroying a gift you
got
> > from the person you love most." -- http://www.melchior.us
> > > > 
> > > >
> > >
> > > > --
> > > > 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] preg_match_all - how does it work?

2002-11-17 Thread Marco Tabini
Hi Randall,

If you look closely at the definition of preg_match_all(), you'll see
that it generates an array of arrays--that's because, for each match, it
generates an array that corresponds to the result of a single call to
preg_match, then puts all the resulting array into another array.

If you use PREG_SET_ORDER, your $match array contains an array for each
of the matches found. Each array then contains:

* The entire matched string in element 0
* Each of the substring (defined in brackets in your pattern) starting
from array 1.

Hope this helps!


Marco
--

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com


On Sun, 2002-11-17 at 11:13, Randall Perry wrote:
> I have some experience in using regular expressions in Perl, and have been
> able to use preg_match in php, but am having a problem with preg_match_all.
> 
> I'm trying to extract data from an HTML table. Here's my preg_match call
> that correctly grabs the 1st row of data in the table. It grabs 4 columns of
> data:
> 
> preg_match("| class=\"CART_TD_REG\".+?(.*?)<.+?(.*?)<.+?(.*?)<.*? ut.*?>[ ]*(.*?).*?|", $res, $match);
> 
> If I use preg_match_all on the same table:
> preg_match_all("| class=\"CART_TD_REG\".+?(.*?)<.+?(.*?)<.+?(.*?)<.*? ut.*?>[ ]*(.*?).*?|", $res, $match, PREG_PATTERN_ORDER);
> 
> ...and try to print output, I get:
> 
> $match[0] = Array
> $match[0][0] = Array[0]
> $match[1][0] = Array[0]
> $match[0][1] = Array[0]
> $match[1][1] = Array[0]
> 
> 
> Same result with PREG_SETORDER.
> 
> What am I doing wrong?
> 
> -- 
> Randall Perry
> sysTame
> 
> Xserve Web Hosting/Co-location
> Website Development/Promotion
> Mac Consulting/Sales
> 
> http://www.systame.com/
> 
> 
> 
> -- 
> 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] gd library

2002-11-17 Thread Jason Sheets
Hello,

YOu will need to provide some more information like your configure line,
the errors that you are receiving. Did you specifcy
--with-gd=/path/to/gd/install or just --with-gd?

What errors did you receive?  --with-gd=/path-to-gd works fine with me
with FreeBSD 4.7-STABLE, gd2 and PHP 4.2.3 and 4.3, and dev.

As you can see there are many different system configurations out there
so more details are needed before anyone can help you.

Jason

On Sat, 2002-11-16 at 19:14, A3-Mail Proxy Handler wrote:
> Hi,
> I am trying to add gd support to my php configuration. But I could not
> manage...
> 
> Here is the versions:
> php 4.2.3, gd 2.0.7, slackware 8.1, apache 1.3.27
> 
> in the make of php, php gives error with gd librarys...
> (sorry, I cannot give errors now, I cannot simulate the situation for now)
> 
> Is this a known issue?
> Does this happens to everyone?
> Should I add something different during configure?
> (I used only --with-gd)
> 
> Thanks...
> 
> 
> -- 
> 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] I'm in need of a PHP web host recommendation

2002-11-17 Thread Jason Sheets
I think this thread has gone on a while but ... I personally recommend
pair (http://www.pair.net) to everyone who asks.  They have an excellent
infrastructure, excellent support, excellent hosting plans and they have
been doing web hosting for years (and making a profit at it).

They own their hardware and Internet connections so they can resolve
issues much faster than someone who is colocated.

pair also lets you host multiple domains on one hosting account which
saves you money if you have multiple domains.

Additionally I would also recommend fidelityhost.com, they also allow
multiple domains have good network speeds and excellent customer
service.

Jason


On Sun, 2002-11-17 at 01:47, John Lim wrote:
> I would recommend http://futurequest.net
> 
> Good, reliable, and very skilled technical people, who know linux and
> web-hosting inside out.
> 
> "John Kenyon" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> > Jason Reid wrote:
> >
> > >I suggest paying a visit to www.webhostingtalk.com and search the
> forums... theres tons of information on the large, and small hosts that
> might help.
> > >
> >
> > I use www.phpwebhosting.com and have been happy with them so far. $10 a
> > month, but they are generous (and flexible, at least so they say) about
> > space and bandwidth.
> >
> > jck
> >
> 
> 
> 
> -- 
> 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] preg_match_all - how does it work?

2002-11-17 Thread Randall Perry
That was my understanding. Question is, why don't my print commands
work...or...how do you access 2 dimensional arrays in php?

> Hi Randall,
> 
> If you look closely at the definition of preg_match_all(), you'll see
> that it generates an array of arrays--that's because, for each match, it
> generates an array that corresponds to the result of a single call to
> preg_match, then puts all the resulting array into another array.
> 
> If you use PREG_SET_ORDER, your $match array contains an array for each
> of the matches found. Each array then contains:
> 
> * The entire matched string in element 0
> * Each of the substring (defined in brackets in your pattern) starting
> from array 1.
> 
> Hope this helps!
> 
> 
> Marco
> --
> 
> php|architect - The magazine for PHP Professionals
> The first monthly worldwide magazine dedicated to PHP programmers
> Check us out on the web at http://www.phparch.com
> 
> 
> On Sun, 2002-11-17 at 11:13, Randall Perry wrote:
>> I have some experience in using regular expressions in Perl, and have been
>> able to use preg_match in php, but am having a problem with preg_match_all.
>> 
>> I'm trying to extract data from an HTML table. Here's my preg_match call
>> that correctly grabs the 1st row of data in the table. It grabs 4 columns of
>> data:
>> 
>> preg_match("|> class=\"CART_TD_REG\".+?(.*?)<.+?(.*?)<.+?(.*?)<.*?> ut.*?>[ ]*(.*?).*?|", $res, $match);
>> 
>> If I use preg_match_all on the same table:
>> preg_match_all("|> class=\"CART_TD_REG\".+?(.*?)<.+?(.*?)<.+?(.*?)<.*?> ut.*?>[ ]*(.*?).*?|", $res, $match, PREG_PATTERN_ORDER);
>> 
>> ...and try to print output, I get:
>> 
>> $match[0] = Array
>> $match[0][0] = Array[0]
>> $match[1][0] = Array[0]
>> $match[0][1] = Array[0]
>> $match[1][1] = Array[0]
>> 
>> 
>> Same result with PREG_SETORDER.
>> 
>> What am I doing wrong?
>> 
>> -- 
>> Randall Perry
>> sysTame
>> 
>> Xserve Web Hosting/Co-location
>> Website Development/Promotion
>> Mac Consulting/Sales
>> 
>> http://www.systame.com/
>> 
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
> 
> 

-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/



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




Re: [PHP] can I retrieve jsp varibable with get or post???

2002-11-17 Thread Jeff Bluemel
ok - the more I look at this the more I'm a bit lost.  passing the variables
from php to java makes sense.  however, from your scripts you listed it is
only possible to pass jsp variables to php by opening a new page, or by
activating a form.

is there a way to pass jsp variables to php while a script is running?  i.e.
use a jsp prompt to get a value as the php script goes on, and then take an
action on that variable?  for instance I have a situation where I need to
apply a credit.  granted, I could use a form to accomplish this, but I feel
it would be much cleaner to use jsp to get the value.

I also have situation where before proceeding I want to get an ok / cancel.

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> php => javascript
> 1st way:
> 
> var var_name= 
> 
> 2nd way:
> 
>
> javascript => php
> 1st way:
> location='http://server/script.php?var_name="; + js_var_name;
> 2nd way:
> form_name.input_name.value = js_var_name;
>
> hope you get the point :-)
>
> Jeff Bluemel wrote:
>
> >Can I utilize java script variables with get or post?  any information on
> >integrating the 2, and passing info back & forth?
> >
> >thanks,
> >
> >Jeff
> >
> >
> >
> >
> >
>



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




[PHP] Whois Search in PHP

2002-11-17 Thread Chandu Nannapaneni
Hi guys,

I have just downloaded whois2.php
from http://www.easydns.com/~markjr/whois2/


It's working great except for certain domains, 
for ex : google.com is being shown as available.

I am in need of a good PHP script which gives me
accurate results about availability of domains.

/Chandu




Re: [PHP] error handling

2002-11-17 Thread Rasmus Lerdorf
Try this.  In your php.ini file:

  display_errors = Off
  log_errors = On
  track_errors = On

Then in your code:

  $php_errormsg = false;
  ob_start();
  ... your code ...
  if($php_errormsg) {
ob_end_clean();  // Error - discard buffer
echo "An error occurred - webmaster notified";
  } else {
ob_end_flush();  // No error, send buffer
  }

-Rasmus

On Sun, 17 Nov 2002, Mattia wrote:

> When the display_errors is Off, and the output of the page comes all in the
> end, or when you're using some template engine or some output buffer
> function (ob_start()), no output is displayed to the screen! I would like to
> tell a message to the use in case of failure of the scripy, without giving
> the information of the kind of error it is.
>
> Display a message like: the application has caused an error! the webmaster
> has been notified by email.
>
> And the precise error in the error log, like: Parse error in line  file
> 
>
> Is there anythig to do it without setting up a custom error log?
>
> thanks
> Mattia
>
>
>
> --
> 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] Uploading images to Mysql

2002-11-17 Thread William Glenn
Hey all, need some quick help. I have some code I was trying to get to work but I keep 
getting this error: 
Warning: fopen("", "rb") - Success in /home/digital/public_html/upload_test.php3 on 
line 18

Warning: stat failed for (errno=2 - No such file or directory) in 
/home/digital/public_html/upload_test.php3 on line 18

Warning: fread(): supplied argument is not a valid File-Handle resource in 
/home/digital/public_html/upload_test.php3 on line 18


Here's my code:



Store binary data into SQL Database




 This file has the following Database ID: $id";

MYSQL_CLOSE();
echo "$data";
 
} else {

// else show the form to submit new data:
?> 

  File Description:
  
  
  
  File to upload/store in database:
  
  


 



Any ideas?

Thanks,
William Glenn
Import Parts Plus
http://www.importpartsplus.com


Re: [PHP] Uploading images to Mysql

2002-11-17 Thread Marco Tabini
Seems to me $form_data might be undefined or empty. Could be a problem
related to register_globals if that value is coming from an HTML form.
Try $_REQUEST['form_data'] instead.


Marco

On Sun, 2002-11-17 at 13:58, William Glenn wrote:
> Hey all, need some quick help. I have some code I was trying to get to work but I 
>keep getting this error: 
> Warning: fopen("", "rb") - Success in /home/digital/public_html/upload_test.php3 on 
>line 18
> 
> Warning: stat failed for (errno=2 - No such file or directory) in 
>/home/digital/public_html/upload_test.php3 on line 18
> 
> Warning: fread(): supplied argument is not a valid File-Handle resource in 
>/home/digital/public_html/upload_test.php3 on line 18
> 
> 
> Here's my code:
> 
> 
> 
> Store binary data into SQL Database
> 
> 
> 
> 
>   // code that will be executed if the form has been submitted:
> 
> if ($submit) {
> 
> // connect to the database
> // (you may have to adjust the hostname,username or password)
> 
> MYSQL_CONNECT("localhost","","");
> mysql_select_db("ipp_products");
> $data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
>
> 
> $result=MYSQL_QUERY("INSERT INTO display_images (description,data) ".
> "VALUES ('$form_description','$form_data')");
> 
> $id= mysql_insert_id();
> print "This file has the following Database ID: $id";
> 
> MYSQL_CLOSE();
> echo "$data";
>  
> } else {
> 
> // else show the form to submit new data:
> ?> 
> 
>   File Description:
>   
>   
>   
>   File to upload/store in database:
>   
>   
> 
> 
>  
> }
> 
> ?> 
> 
> 
> 
> Any ideas?
> 
> Thanks,
> William Glenn
> Import Parts Plus
> http://www.importpartsplus.com



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




Re: [PHP] Uploading images to Mysql

2002-11-17 Thread Marco Tabini
Sorry--I should have read ALL your code...

Try taking a look at this manual page: 

http://ca.php.net/manual/en/features.file-upload.php

It explains how to handle file uploads. Your file name should appear in
$_FILES['form_data'].

On Sun, 2002-11-17 at 12:54, Marco Tabini wrote:
> Seems to me $form_data might be undefined or empty. Could be a problem
> related to register_globals if that value is coming from an HTML form.
> Try $_REQUEST['form_data'] instead.
> 
> 
> Marco
> 
> On Sun, 2002-11-17 at 13:58, William Glenn wrote:
> > Hey all, need some quick help. I have some code I was trying to get to work but I 
>keep getting this error: 
> > Warning: fopen("", "rb") - Success in /home/digital/public_html/upload_test.php3 
>on line 18
> > 
> > Warning: stat failed for (errno=2 - No such file or directory) in 
>/home/digital/public_html/upload_test.php3 on line 18
> > 
> > Warning: fread(): supplied argument is not a valid File-Handle resource in 
>/home/digital/public_html/upload_test.php3 on line 18
> > 
> > 
> > Here's my code:
> > 
> > 
> > 
> > Store binary data into SQL Database
> > 
> > 
> > 
> > 
> >   > // code that will be executed if the form has been submitted:
> > 
> > if ($submit) {
> > 
> > // connect to the database
> > // (you may have to adjust the hostname,username or password)
> > 
> > MYSQL_CONNECT("localhost","","");
> > mysql_select_db("ipp_products");
> > $data = addslashes(fread(fopen($form_data, "rb"), filesize($form_data)));
> >
> > 
> > $result=MYSQL_QUERY("INSERT INTO display_images (description,data) ".
> > "VALUES ('$form_description','$form_data')");
> > 
> > $id= mysql_insert_id();
> > print "This file has the following Database ID: $id";
> > 
> > MYSQL_CLOSE();
> > echo "$data";
> >  
> > } else {
> > 
> > // else show the form to submit new data:
> > ?> 
> > enctype="multipart/form-data">
> >   File Description:
> >   
> >   
> >   
> >   File to upload/store in database:
> >   
> >   
> > 
> > 
> >  > 
> > }
> > 
> > ?> 
> > 
> > 
> > 
> > Any ideas?
> > 
> > Thanks,
> > William Glenn
> > Import Parts Plus
> > http://www.importpartsplus.com
> 
> 
> 
> -- 
> 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] Whois Search in PHP

2002-11-17 Thread Hatem Ben
this is what the whois server return exactly for Google (using
whois.internic.net):

Whois Server Version 1.3

Domain names in the .com, .net, and .org domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

GOOGLE.COM.IS.THE.GREATEST.SEARCH.ENGINE.EVER.JIMPHILLIPS.ORG
GOOGLE.COM

To single out one record, look it up with "xxx", where xxx is one of the
of the records displayed above. If the records are the same, look them up
with "=xxx" to receive a full display for each record.

>>> Last update of whois database: Sun, 17 Nov 2002 05:25:23 EST <<<

The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and
Registrars.

it isn't the problem of the whois script only :))

Hatem

- Original Message -
From: "Chandu Nannapaneni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 6:49 PM
Subject: [PHP] Whois Search in PHP


Hi guys,

I have just downloaded whois2.php
from http://www.easydns.com/~markjr/whois2/


It's working great except for certain domains,
for ex : google.com is being shown as available.

I am in need of a good PHP script which gives me
accurate results about availability of domains.

/Chandu




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




php-general Digest 17 Nov 2002 18:43:16 -0000 Issue 1710

2002-11-17 Thread php-general-digest-help

php-general Digest 17 Nov 2002 18:43:16 - Issue 1710

Topics (messages 124771 through 124809):

Re: Fractions
124771 by: Jason Wong

Re: Display cell if dates are between 2 dates - help
124772 by: Jason Wong
124785 by: Ray Healy \(Data Net Services\)

Serialization of references to objects
124773 by: Jonathan Sharp

Unusual HTTP header control
124774 by: Morgan Hughes
124775 by: Brendon G
124776 by: Morgan Hughes

Re: Php Form Issue
124777 by: Justin French

Re: Opening a file to manipulate it
124778 by: Justin French

what is the PHP equivalent of Transactional ASP page
124779 by: See Kok Boon
124780 by: Rasmus Lerdorf
124782 by: Justin French

Re: I'm in need of a PHP web host recommendation
124781 by: John Lim
124801 by: Jason Sheets

Re: POSIX and PCRE help
124783 by: Aaron
124792 by: OrangeHairedBoy

post files array and registered globals off
124784 by: electroteque

PHP search engines
124786 by: Phil Schwarzmann
124787 by: cece.syrup
124788 by: Richard Pijnenburg
124789 by: Khalid El-Kary

gd library
124790 by: A3-Mail Proxy Handler
124800 by: Jason Sheets

Calling $PATH_INFO
124791 by: Mr. BuNgL3
124793 by: OrangeHairedBoy

Re: Searching a Table
124794 by: Stephen
124798 by: Stephen

How do I get email address of sender
124795 by: AKHIL KODALI

error handling
124796 by: Mattia
124805 by: Rasmus Lerdorf

preg_match_all - how does it work?
124797 by: Randall Perry
124799 by: Marco Tabini
124802 by: Randall Perry

Re: can I retrieve jsp varibable with get or post???
124803 by: Jeff Bluemel

Whois Search in PHP
124804 by: Chandu Nannapaneni
124809 by: Hatem Ben

Uploading images to Mysql
124806 by: William Glenn
124807 by: Marco Tabini
124808 by: Marco Tabini

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---
On Sunday 17 November 2002 03:09, Stephen wrote:
> 9/5 and 5/9 would be a repeating deicmal. I find fractions would be easier
> to multiply then a repeating deicmal. 

But php doesn't care one bit (and neither should you) whether you use 

echo ( (5/9) * (80-32) );
OR  echo ( 0.6 * (80-32) );

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If the code and the comments disagree, then both are probably wrong.
-- Norm Schryer
*/


--- End Message ---
--- Begin Message ---
On Sunday 17 November 2002 04:10, Ray Healy \(Data Net Services\) wrote:
> Dear all
>
> I'm trying to create a search function that can check the current day in a
> calendar against a mysql database where there is a startdate and enddate
> and if the date is there then colour code the cell in the calendar.
>
> I have tried to use the following command
>
> $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday'
> BETWEEN startdate AND enddate;";
>
> The database has an ID - title - startdate - enddate

What types are the columns 'startdate' and 'enddate'?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You're ugly and your mother dresses you funny.
*/


--- End Message ---
--- Begin Message ---
Dear Jason

The startdate and endate columns are "date" format - have any ideas what i
can do

Thanks for yout help

Ray
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 6:22 AM
Subject: Re: [PHP] Display cell if dates are between 2 dates - help


> On Sunday 17 November 2002 04:10, Ray Healy \(Data Net Services\) wrote:
> > Dear all
> >
> > I'm trying to create a search function that can check the current day in
a
> > calendar against a mysql database where there is a startdate and enddate
> > and if the date is there then colour code the cell in the calendar.
> >
> > I have tried to use the following command
> >
> > $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday'
> > BETWEEN startdate AND enddate;";
> >
> > The database has an ID - title - startdate - enddate
>
> What types are the columns 'startdate' and 'enddate'?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> You're ugly and your mother dresses you funny.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net

Re: [PHP] preg_match_all - how does it work?

2002-11-17 Thread Jason Wong
On Monday 18 November 2002 01:09, Randall Perry wrote:
> That was my understanding. Question is, why don't my print commands
> work...or...how do you access 2 dimensional arrays in php?

print_r() or var_dump()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If parents would only realize how they bore their children.
-- G.B. Shaw
*/


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




[PHP] Write file can't work ?!? :-(

2002-11-17 Thread Ivan Mareniæ
Hi.

I am trying to create little counter:
I can't open file for writing.
I've tried different params: "w", "r+", "wb" ... nothnig works

I am using IIS 5.0 , and I have set permitions to read & write files on
server.


= source code ===

if(is_writable("counter.txt")==TRUE)
 echo "File is writable";
else
 echo "File is NOT writable";

echo "";

$fd = fopen ("counter.txt", "r");
$my_count=0;
while (!feof ($fd)) {
$my_count = fgets($fd, 4096);
}
fclose ($fd);

$fd = fopen ("counter.txt", "wb");
if($fd==TRUE)
 {
 $my_count++;
 fputs($fd, $my_count);
 fclose ($fd);
 }

echo "Your are user no:";
echo $my_count;

= end source 

but after execution PHP says that:

File is writable

Warning: fopen("counter.txt", "wb") - Permission denied in
c:\inetpub\wwwroot\PSK\user_no.php on line 27
Your are user no:8

Whay can't I open file for writing???

Thanks for help!!!




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




Re: [PHP] Write file can't work ?!? :-(

2002-11-17 Thread Stephen
wb is not a permission. Try putting just w.


- Original Message -
From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 2:47 PM
Subject: [PHP] Write file can't work ?!? :-(


> Hi.
>
> I am trying to create little counter:
> I can't open file for writing.
> I've tried different params: "w", "r+", "wb" ... nothnig works
>
> I am using IIS 5.0 , and I have set permitions to read & write files on
> server.
>
>
> = source code ===
>
> if(is_writable("counter.txt")==TRUE)
>  echo "File is writable";
> else
>  echo "File is NOT writable";
>
> echo "";
>
> $fd = fopen ("counter.txt", "r");
> $my_count=0;
> while (!feof ($fd)) {
> $my_count = fgets($fd, 4096);
> }
> fclose ($fd);
>
> $fd = fopen ("counter.txt", "wb");
> if($fd==TRUE)
>  {
>  $my_count++;
>  fputs($fd, $my_count);
>  fclose ($fd);
>  }
>
> echo "Your are user no:";
> echo $my_count;
>
> = end source 
>
> but after execution PHP says that:
>
> File is writable
>
> Warning: fopen("counter.txt", "wb") - Permission denied in
> c:\inetpub\wwwroot\PSK\user_no.php on line 27
> Your are user no:8
>
> Whay can't I open file for writing???
>
> Thanks for help!!!
>
>
>
>
> --
> 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] Write file can't work ?!? :-(

2002-11-17 Thread Ivan Marenic
I've tried. It doesent work.

PHP documentation for fopen function says following:

Note: The mode may contain the letter 'b'. This is useful only on systems
which differentiate between binary and text files (i.e. Windows. It's
useless on Unix). If not needed, this will be ignored.

I've tried all variations: "w", "r+", "wb" ... nothnig works.



"Stephen" <[EMAIL PROTECTED]> wrote in message
000901c28e73$2f24a870$0200a8c0@melchior">news:000901c28e73$2f24a870$0200a8c0@melchior...
> wb is not a permission. Try putting just w.
>
>
> - Original Message -
> From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, November 17, 2002 2:47 PM
> Subject: [PHP] Write file can't work ?!? :-(
>
>
> > Hi.
> >
> > I am trying to create little counter:
> > I can't open file for writing.
> > I've tried different params: "w", "r+", "wb" ... nothnig works
> >
> > I am using IIS 5.0 , and I have set permitions to read & write files on
> > server.
> >
> >
> > = source code ===
> >
> > if(is_writable("counter.txt")==TRUE)
> >  echo "File is writable";
> > else
> >  echo "File is NOT writable";
> >
> > echo "";
> >
> > $fd = fopen ("counter.txt", "r");
> > $my_count=0;
> > while (!feof ($fd)) {
> > $my_count = fgets($fd, 4096);
> > }
> > fclose ($fd);
> >
> > $fd = fopen ("counter.txt", "wb");
> > if($fd==TRUE)
> >  {
> >  $my_count++;
> >  fputs($fd, $my_count);
> >  fclose ($fd);
> >  }
> >
> > echo "Your are user no:";
> > echo $my_count;
> >
> > = end source 
> >
> > but after execution PHP says that:
> >
> > File is writable
> >
> > Warning: fopen("counter.txt", "wb") - Permission denied in
> > c:\inetpub\wwwroot\PSK\user_no.php on line 27
> > Your are user no:8
> >
> > Whay can't I open file for writing???
> >
> > Thanks for help!!!
> >
> >
> >
> >
> > --
> > 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] Write file can't work ?!? :-(

2002-11-17 Thread Marco Tabini
Do you get any error messages?


On Sun, 2002-11-17 at 14:57, Ivan Marenic wrote:
> I've tried. It doesent work.
> 
> PHP documentation for fopen function says following:
> 
> Note: The mode may contain the letter 'b'. This is useful only on systems
> which differentiate between binary and text files (i.e. Windows. It's
> useless on Unix). If not needed, this will be ignored.
> 
> I've tried all variations: "w", "r+", "wb" ... nothnig works.
> 
> 
> 
> "Stephen" <[EMAIL PROTECTED]> wrote in message
> 000901c28e73$2f24a870$0200a8c0@melchior">news:000901c28e73$2f24a870$0200a8c0@melchior...
> > wb is not a permission. Try putting just w.
> >
> >
> > - Original Message -
> > From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, November 17, 2002 2:47 PM
> > Subject: [PHP] Write file can't work ?!? :-(
> >
> >
> > > Hi.
> > >
> > > I am trying to create little counter:
> > > I can't open file for writing.
> > > I've tried different params: "w", "r+", "wb" ... nothnig works
> > >
> > > I am using IIS 5.0 , and I have set permitions to read & write files on
> > > server.
> > >
> > >
> > > = source code ===
> > >
> > > if(is_writable("counter.txt")==TRUE)
> > >  echo "File is writable";
> > > else
> > >  echo "File is NOT writable";
> > >
> > > echo "";
> > >
> > > $fd = fopen ("counter.txt", "r");
> > > $my_count=0;
> > > while (!feof ($fd)) {
> > > $my_count = fgets($fd, 4096);
> > > }
> > > fclose ($fd);
> > >
> > > $fd = fopen ("counter.txt", "wb");
> > > if($fd==TRUE)
> > >  {
> > >  $my_count++;
> > >  fputs($fd, $my_count);
> > >  fclose ($fd);
> > >  }
> > >
> > > echo "Your are user no:";
> > > echo $my_count;
> > >
> > > = end source 
> > >
> > > but after execution PHP says that:
> > >
> > > File is writable
> > >
> > > Warning: fopen("counter.txt", "wb") - Permission denied in
> > > c:\inetpub\wwwroot\PSK\user_no.php on line 27
> > > Your are user no:8
> > >
> > > Whay can't I open file for writing???
> > >
> > > Thanks for help!!!
> > >
> > >
> > >
> > >
> > > --
> > > 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] Write file can't work ?!? :-(

2002-11-17 Thread Chris Knipe
The IIS user running the web server on NT needs read/write permissions on
the file in the web server.  By default, it only have read access to the
file...


- Original Message -
From: "Stephen" <[EMAIL PROTECTED]>
To: "Ivan Mareniæ" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 9:54 PM
Subject: Re: [PHP] Write file can't work ?!? :-(


> wb is not a permission. Try putting just w.
>
>
> - Original Message -
> From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, November 17, 2002 2:47 PM
> Subject: [PHP] Write file can't work ?!? :-(
>
>
> > Hi.
> >
> > I am trying to create little counter:
> > I can't open file for writing.
> > I've tried different params: "w", "r+", "wb" ... nothnig works
> >
> > I am using IIS 5.0 , and I have set permitions to read & write files on
> > server.
> >
> >
> > = source code ===
> >
> > if(is_writable("counter.txt")==TRUE)
> >  echo "File is writable";
> > else
> >  echo "File is NOT writable";
> >
> > echo "";
> >
> > $fd = fopen ("counter.txt", "r");
> > $my_count=0;
> > while (!feof ($fd)) {
> > $my_count = fgets($fd, 4096);
> > }
> > fclose ($fd);
> >
> > $fd = fopen ("counter.txt", "wb");
> > if($fd==TRUE)
> >  {
> >  $my_count++;
> >  fputs($fd, $my_count);
> >  fclose ($fd);
> >  }
> >
> > echo "Your are user no:";
> > echo $my_count;
> >
> > = end source 
> >
> > but after execution PHP says that:
> >
> > File is writable
> >
> > Warning: fopen("counter.txt", "wb") - Permission denied in
> > c:\inetpub\wwwroot\PSK\user_no.php on line 27
> > Your are user no:8
> >
> > Whay can't I open file for writing???
> >
> > Thanks for help!!!
> >
> >
> >
> >
> > --
> > 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] Write file can't work ?!? :-(

2002-11-17 Thread Jason Sheets
Have you tried giving it an absolute path rather than a relative one?  

Jason

On Sun, 2002-11-17 at 12:57, Ivan Marenic wrote:
> I've tried. It doesent work.
> 
> PHP documentation for fopen function says following:
> 
> Note: The mode may contain the letter 'b'. This is useful only on systems
> which differentiate between binary and text files (i.e. Windows. It's
> useless on Unix). If not needed, this will be ignored.
> 
> I've tried all variations: "w", "r+", "wb" ... nothnig works.
> 
> 
> 
> "Stephen" <[EMAIL PROTECTED]> wrote in message
> 000901c28e73$2f24a870$0200a8c0@melchior">news:000901c28e73$2f24a870$0200a8c0@melchior...
> > wb is not a permission. Try putting just w.
> >
> >
> > - Original Message -
> > From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, November 17, 2002 2:47 PM
> > Subject: [PHP] Write file can't work ?!? :-(
> >
> >
> > > Hi.
> > >
> > > I am trying to create little counter:
> > > I can't open file for writing.
> > > I've tried different params: "w", "r+", "wb" ... nothnig works
> > >
> > > I am using IIS 5.0 , and I have set permitions to read & write files on
> > > server.
> > >
> > >
> > > = source code ===
> > >
> > > if(is_writable("counter.txt")==TRUE)
> > >  echo "File is writable";
> > > else
> > >  echo "File is NOT writable";
> > >
> > > echo "";
> > >
> > > $fd = fopen ("counter.txt", "r");
> > > $my_count=0;
> > > while (!feof ($fd)) {
> > > $my_count = fgets($fd, 4096);
> > > }
> > > fclose ($fd);
> > >
> > > $fd = fopen ("counter.txt", "wb");
> > > if($fd==TRUE)
> > >  {
> > >  $my_count++;
> > >  fputs($fd, $my_count);
> > >  fclose ($fd);
> > >  }
> > >
> > > echo "Your are user no:";
> > > echo $my_count;
> > >
> > > = end source 
> > >
> > > but after execution PHP says that:
> > >
> > > File is writable
> > >
> > > Warning: fopen("counter.txt", "wb") - Permission denied in
> > > c:\inetpub\wwwroot\PSK\user_no.php on line 27
> > > Your are user no:8
> > >
> > > Whay can't I open file for writing???
> > >
> > > Thanks for help!!!
> > >
> > >
> > >
> > >
> > > --
> > > 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] php imap functions

2002-11-17 Thread Bill Rowell

i've been doing some development using php's imap functions.  i'm
wondering if its possible to use imap_open to open mailboxes that are
stored in a user's personal space and not in /var/spool/mail.  thanks!

-bill


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




[PHP] Protecting Queries

2002-11-17 Thread Stephen



Since day one of me doing MySQL stuff in PHP, I've always set 
up my query as a variable then put it into the query function such as 
this:
 
    $query = "SELECT * FROM bobstuff WHERE 
id='1'";
    $result = mysql_query($query, 
$connection);
 
I've just come aware of the security risks of this. How could 
I make it so the $query variable isn't editable from the URL? Should I turn 
register_globals off?
Thanks,Stephen Cratonhttp://www.melchior.us
 
"Life is a gift from God. Wasting it is like destroying a gift you got from 
the person you love most." -- http://www.melchior.us
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Protecting Queries

2002-11-17 Thread Jonathan Sharp
the issue isn't with query, it's with variables used within queries...

example:
$id = $_GET['id'];
$query = "SELECT * FROM mytable WHERE id=$id";

and if you call this page as (or something like this):
?id='' OR 1=1

You can alter the query

-js


Stephen wrote:
> Since day one of me doing MySQL stuff in PHP, I've always set up my
> query as a variable then put it into the query function such as this:
>  
> $query = "SELECT * FROM bobstuff WHERE id='1'";
> $result = mysql_query($query, $connection);
>  
> I've just come aware of the security risks of this. How could I make it
> so the $query variable isn't editable from the URL? Should I turn
> register_globals off?
> 
> Thanks,
> Stephen Craton
> http://www.melchior.us
>  
> "Life is a gift from God. Wasting it is like destroying a gift you got
> from the person you love most." -- http://www.melchior.us
> 




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




Re: [PHP] php imap functions

2002-11-17 Thread Rasmus Lerdorf
PHP's imap functions are a thin wrapper on top of the c-client library.
Your best resource would be to go check the docs for that.

-Rasmus

On Sun, 17 Nov 2002, Bill Rowell wrote:

>
> i've been doing some development using php's imap functions.  i'm
> wondering if its possible to use imap_open to open mailboxes that are
> stored in a user's personal space and not in /var/spool/mail.  thanks!
>
> -bill
>
>
> --
> 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] Protecting Queries

2002-11-17 Thread Rasmus Lerdorf
No, that it fine.  User-supplied data can not override a variable defined
directly in your script like that regardless of the register_globals
setting.

-Rasmus

On Sun, 17 Nov 2002, Stephen wrote:

> Since day one of me doing MySQL stuff in PHP, I've always set up my query as a 
>variable then put it into the query function such as this:
>
> $query = "SELECT * FROM bobstuff WHERE id='1'";
> $result = mysql_query($query, $connection);
>
> I've just come aware of the security risks of this. How could I make it so the 
>$query variable isn't editable from the URL? Should I turn register_globals off?
>
> Thanks,
> Stephen Craton
> http://www.melchior.us
>
> "Life is a gift from God. Wasting it is like destroying a gift you got from the 
>person you love most." -- http://www.melchior.us


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




Re: [PHP] running php as cgi script

2002-11-17 Thread Scott
Well,  I've got a few test scripts to run by following the suggestions from 
the posts. There's just one thing that's not quite right yet.  The 
"#!/usr/bin/php" line appears at the top of the page.  For instance when I 
run the following script from the cgi-bin:

#!/usr/bin/php


The phpinfo page comes up fine, but "#!/usr/bin/php" appears at the top.  
This happens whether I call the script "test.php" or "test.cgi".  Appreciate 
any tips on how to get rid of it or why it's there.

Thanks,
SW

On Saturday 16 November 2002 12:17 am, you wrote:
> I'm not intending to run the script from the shell. What I am trying to do
> is encrypt emails with Gnupg.  The problem is Gnupg runs as my user name
> and php runs as nobody.  So I'm trying to run a php script as cgi to
> deliver the data to Gnupg since a cgi script will run as my username.  I am
> using a perl script right now and it works, but the rest of the application
> is in php, so its causing some me some design difficulties.
> I'm going to try some the suggestions posted and see if I can get it
> working. Thanks,
> SW
>
> On Friday 15 November 2002 11:04 pm, you wrote:
> > Joseph, I think he's trying to run the script from the shell--in which
> > case it looks okay to me (besides perhaps a terminating semicolon on the
> > last line)
> >
> > Marco

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




[PHP] howto pass javascript variable to php

2002-11-17 Thread Jeff Bluemel
it's easy enough to pass php variable to javascript, but doing this the
other way around without a form submit, or location (passing as a php $_GET
variable) seems to be a little nightmare.  it's easy enough to do it with
the form submit, or a location command.

thanks,

Jeff



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




Re: [PHP] Protecting Queries

2002-11-17 Thread Stephen
What I meant was something like this:

  The user types in the URL http://myplace/script.php?query=DELTE * FROM
table WHERE id=1.
  The query is overwritten and the section is deleted...

Is that possible?


> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Sunday, November 17, 2002 3:46 PM
> Subject: Re: [PHP] Protecting Queries
>
>
> > No, that it fine.  User-supplied data can not override a variable
defined
> > directly in your script like that regardless of the register_globals
> > setting.
> >
> > -Rasmus
> >
> > On Sun, 17 Nov 2002, Stephen wrote:
> >
> > > Since day one of me doing MySQL stuff in PHP, I've always set up my
> query as a variable then put it into the query function such as this:
> > >
> > > $query = "SELECT * FROM bobstuff WHERE id='1'";
> > > $result = mysql_query($query, $connection);
> > >
> > > I've just come aware of the security risks of this. How could I make
it
> so the $query variable isn't editable from the URL? Should I turn
> register_globals off?
> > >
> > > Thanks,
> > > Stephen Craton
> > > http://www.melchior.us
> > >
> > > "Life is a gift from God. Wasting it is like destroying a gift you got
> from the person you love most." -- http://www.melchior.us
> >
> >
>


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




Re: [PHP] Protecting Queries

2002-11-17 Thread Stephen
Oh, right, thanks!


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 4:05 PM
Subject: Re: [PHP] Protecting Queries


> No, like I said, since you set $query in your script, whatever the user
> passes in is overwritten.
>
> On Sun, 17 Nov 2002, Stephen wrote:
>
> > What I meant was something like this:
> >
> >   The user types in the URL http://myplace/script.php?query=DELTE * FROM
> > table WHERE id=1.
> >   The query is overwritten and the section is deleted...
> >
> > Is that possible?
> >
> >
> > - Original Message -
> > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > To: "Stephen" <[EMAIL PROTECTED]>
> > Cc: "PHP List" <[EMAIL PROTECTED]>
> > Sent: Sunday, November 17, 2002 3:46 PM
> > Subject: Re: [PHP] Protecting Queries
> >
> >
> > > No, that it fine.  User-supplied data can not override a variable
defined
> > > directly in your script like that regardless of the register_globals
> > > setting.
> > >
> > > -Rasmus
> > >
> > > On Sun, 17 Nov 2002, Stephen wrote:
> > >
> > > > Since day one of me doing MySQL stuff in PHP, I've always set up my
> > query as a variable then put it into the query function such as this:
> > > >
> > > > $query = "SELECT * FROM bobstuff WHERE id='1'";
> > > > $result = mysql_query($query, $connection);
> > > >
> > > > I've just come aware of the security risks of this. How could I make
it
> > so the $query variable isn't editable from the URL? Should I turn
> > register_globals off?
> > > >
> > > > Thanks,
> > > > Stephen Craton
> > > > http://www.melchior.us
> > > >
> > > > "Life is a gift from God. Wasting it is like destroying a gift you
got
> > from the person you love most." -- http://www.melchior.us
> > >
> > >
> >
>
>


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




Re: [PHP] Whois Search in PHP

2002-11-17 Thread Hatem Ben
well, i guess there is NO OTHER WAY to check the availability of a domain
other than using whois server


I use the same concept as this minimalistic sample with a full list of whois
servers here http://www.dynamix-tn.com/?go=whois
just parse the domain and use the suitable server and most of the time it
return a fresh information, just use the suitable server.

PS : send your emails to [EMAIL PROTECTED] :)))

Hatem

- Original Message -
From: "Chandu Nannapaneni" <[EMAIL PROTECTED]>
To: "Hatem Ben" <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 8:21 PM
Subject: Re: [PHP] Whois Search in PHP


> No... U got me wrong..
>
> Actually I'm looking for PHP scripts which can
> tell about the availability of domains.
>
> Using a WhoIs script serves the purpose, but not always.
>
> So I want suggestions from anybody how I can Find out
> the availability of a domain ( sld + tld ) for fresh registration.
>
> /Chandu
> - Original Message -
> From: "Hatem Ben" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 18, 2002 12:12 AM
> Subject: Re: [PHP] Whois Search in PHP
>
>
> > this is what the whois server return exactly for Google (using
> > whois.internic.net):
> >
> > Whois Server Version 1.3
> >
> > Domain names in the .com, .net, and .org domains can now be registered
> > with many different competing registrars. Go to http://www.internic.net
> > for detailed information.
> >
> > GOOGLE.COM.IS.THE.GREATEST.SEARCH.ENGINE.EVER.JIMPHILLIPS.ORG
> > GOOGLE.COM
> >
> > To single out one record, look it up with "xxx", where xxx is one of the
> > of the records displayed above. If the records are the same, look them
up
> > with "=xxx" to receive a full display for each record.
> >
> > >>> Last update of whois database: Sun, 17 Nov 2002 05:25:23 EST <<<
> >
> > The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and
> > Registrars.
> >
> > it isn't the problem of the whois script only :))
> >
> > Hatem
> >
> > - Original Message -
> > From: "Chandu Nannapaneni" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, November 17, 2002 6:49 PM
> > Subject: [PHP] Whois Search in PHP
> >
> >
> > Hi guys,
> >
> > I have just downloaded whois2.php
> > from http://www.easydns.com/~markjr/whois2/
> >
> >
> > It's working great except for certain domains,
> > for ex : google.com is being shown as available.
> >
> > I am in need of a good PHP script which gives me
> > accurate results about availability of domains.
> >
> > /Chandu
> >
> >
> >
> >
> > --
> > 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] unlink and directory ownership

2002-11-17 Thread electroteque
hi guys , having permission denied errors trying to access a directory
created via ftp , when i create a directory ftp it has my login username and
my group where the apache server group and user is different and cant seem
to have writable access to it :|, its chmodded to 777 so no idea



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




Re: [PHP] running php as cgi script

2002-11-17 Thread Jason Wong
On Monday 18 November 2002 04:55, Scott wrote:
> Well,  I've got a few test scripts to run by following the suggestions from
> the posts. There's just one thing that's not quite right yet.  The
> "#!/usr/bin/php" line appears at the top of the page.  For instance when I
> run the following script from the cgi-bin:
>
> #!/usr/bin/php

RTFM! Use:

#!/usr/bin/php -q

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If you don't drink it, someone else will.
*/


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




Re: [PHP] Write file can't work ?!? :-(

2002-11-17 Thread Ivan Marenic
I've tried same source on different OS and it works OK.

I assume there is a BUG, for win 2000.

Thank you all for help.
Kind regards, Ivan




"Jason Sheets" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Have you tried giving it an absolute path rather than a relative one?

Jason

On Sun, 2002-11-17 at 12:57, Ivan Marenic wrote:
> I've tried. It doesent work.
>
> PHP documentation for fopen function says following:
>
> Note: The mode may contain the letter 'b'. This is useful only on systems
> which differentiate between binary and text files (i.e. Windows. It's
> useless on Unix). If not needed, this will be ignored.
>
> I've tried all variations: "w", "r+", "wb" ... nothnig works.
>
>
>
> "Stephen" <[EMAIL PROTECTED]> wrote in message
> 000901c28e73$2f24a870$0200a8c0@melchior">news:000901c28e73$2f24a870$0200a8c0@melchior...
> > wb is not a permission. Try putting just w.
> >
> >
> > - Original Message -
> > From: "Ivan Mareniæ" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, November 17, 2002 2:47 PM
> > Subject: [PHP] Write file can't work ?!? :-(
> >
> >
> > > Hi.
> > >
> > > I am trying to create little counter:
> > > I can't open file for writing.
> > > I've tried different params: "w", "r+", "wb" ... nothnig works
> > >
> > > I am using IIS 5.0 , and I have set permitions to read & write files
on
> > > server.
> > >
> > >
> > > = source code ===
> > >
> > > if(is_writable("counter.txt")==TRUE)
> > >  echo "File is writable";
> > > else
> > >  echo "File is NOT writable";
> > >
> > > echo "";
> > >
> > > $fd = fopen ("counter.txt", "r");
> > > $my_count=0;
> > > while (!feof ($fd)) {
> > > $my_count = fgets($fd, 4096);
> > > }
> > > fclose ($fd);
> > >
> > > $fd = fopen ("counter.txt", "wb");
> > > if($fd==TRUE)
> > >  {
> > >  $my_count++;
> > >  fputs($fd, $my_count);
> > >  fclose ($fd);
> > >  }
> > >
> > > echo "Your are user no:";
> > > echo $my_count;
> > >
> > > = end source 
> > >
> > > but after execution PHP says that:
> > >
> > > File is writable
> > >
> > > Warning: fopen("counter.txt", "wb") - Permission denied in
> > > c:\inetpub\wwwroot\PSK\user_no.php on line 27
> > > Your are user no:8
> > >
> > > Whay can't I open file for writing???
> > >
> > > Thanks for help!!!
> > >
> > >
> > >
> > >
> > > --
> > > 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] Protecting Queries

2002-11-17 Thread Alnisa Allgood
At 3:31 PM -0500 11/17/02, Stephen wrote:

Since day one of me doing MySQL stuff in PHP, I've always set up my 
query as a variable then put it into the query function such as this:

$query = "SELECT * FROM bobstuff WHERE id='1'";
$result = mysql_query($query, $connection);

I've just come aware of the security risks of this. How could I make 
it so the $query variable isn't editable from the URL? Should I turn 
register_globals off?



Typically speaking you should always use the PHP 
mysql_escape_string() function, when accepting data from users. 
While, I'm not certain its relevant in your situation, since your 
variable is predefined. But this would be of importance for any forms 
you would have. To use you just add some code such as:

	$usrName=mysql_escape_string($usrName);

one for each field on a form, than you can do

	$result=mysql_result("SELECT * FROM abc WHERE 
usrName='$usrName', $gDB);

This will protect you from users who enter Select, DROP, and other 
statements in your data field.

ALnisa
--
  .
   Alnisa  Allgood
   Executive Director
   Nonprofit Tech
   (ph) 415.337.7412  (fx) 415.337.7927
   (url)  http://www.nonprofit-techworld.org
   (url)  http://www.nonprofit-tech.org
   (url)  http://www.tech-library.org
  .
   Nonprofit Tech E-Update
   mailto:[EMAIL PROTECTED]
  .
   transforming nonprofits through technology
  .


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



[PHP] image size problems

2002-11-17 Thread JohnMeyer
Does anybody have any algorhythms to deal with image sizing (i.e. a picture 
needs to be this big).



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



[PHP] OOP-classes in PHP

2002-11-17 Thread Tularis
currently I have the followig script:

everything works fine, except for the fact that it doesn't seem to 
understand $overall->foo->foo();. It returns this error:
"Fatal error: Call to a member function on a non-object in 
d:\apache\htdocs\classes.php on line 32"

Now, I know the object is loaded, because the constructor is run, and 
puts out a 1 onscreen... I wish to know how to make this work...
any help plz?

thanx
- Tularis


class overall {
	var $loaded;
	
	function load($class){
		eval("\$$class = new $class;");
		return true;
	}
}

class foo {
	var $bar;

	// Constructor
	function foo(){
		if(!isset($this->bar)){
			$this->bar = 1;
		}else{
			$this->bar++;
		}
		echo $this->bar."";
	}
}

// Start actual loading
$overall = new overall;
$overall->load('foo');

// As of here it won't work anymore... somehow $overall->foo-> doesn't 
work...

$overall->foo->foo();
?>

(and if possible, I would also like to change $overall->foo->foo() to 
$foo->foo(), but still keeping that class as a 'subclass' to the overall 
one.)


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



[PHP] coding special characters in html

2002-11-17 Thread Børge Strand

Hi all,

I'm cooking tothether a tiny php html editor right now, (textarea kind
of thing). To treat the text properly I need to encode characters like
'"', '<', '>', and friends into something that doesn't confuse the
browser. 

I got it to work with regexps, you can see a part of the decoder
below. But I believe there must be some automatic stuff in php which
does this. Anybody out there knowing about such a function?

$pattern = "/"/";
$replacement = "\""; 
$string = preg_replace($pattern ,$replacement, $string);

By the way, do you think encoding and decoding special characters like
this may replace addslashes() and stripslashes()? The html pages will
be stored in a MySQL database. 

Also, addslashes() will reduce the chance of bad stuff being passed to
MySQL. But is there a function which stops client-side scripts in
whatever is entered by the user?


Regards, 

Børge

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




Re: [PHP] coding special characters in html

2002-11-17 Thread Marco Tabini
Sure, its htmlentities(), combined (possibly) with nb2br()

http://www.php.net/manual/en/function.htmlentities.php


Marco


On Sun, 2002-11-17 at 17:34, Børge Strand wrote:
> 
> Hi all,
> 
> I'm cooking tothether a tiny php html editor right now, (textarea kind
> of thing). To treat the text properly I need to encode characters like
> '"', '<', '>', and friends into something that doesn't confuse the
> browser. 
> 
> I got it to work with regexps, you can see a part of the decoder
> below. But I believe there must be some automatic stuff in php which
> does this. Anybody out there knowing about such a function?
> 
> $pattern = "/"/";
> $replacement = "\""; 
> $string = preg_replace($pattern ,$replacement, $string);
> 
> By the way, do you think encoding and decoding special characters like
> this may replace addslashes() and stripslashes()? The html pages will
> be stored in a MySQL database. 
> 
> Also, addslashes() will reduce the chance of bad stuff being passed to
> MySQL. But is there a function which stops client-side scripts in
> whatever is entered by the user?
> 
> 
> Regards, 
> 
> Børge
> 
> -- 
> 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] I'm in need of a PHP web host recommendation

2002-11-17 Thread Brendon G

ProHosters

http://www.prohosters.com

Good plans, Good Price, Great Support.

I recommend the semi dedicated plans.

Cheers

Brendon

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




[PHP] Minutes to hours/days/monthes/years?

2002-11-17 Thread Leif K-Brooks
I'm looking for a good way to convert minutes to hours, days, or years - 
the largest it will fit into.  For example, 120 would become "2 hours". 
90 would become "1 hour and 30 minutes".  Any ideas?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



[PHP] damn it... i want to tranfer data from one table to another!

2002-11-17 Thread Mr. BuNgL3
Why i can't tranfer data from one table to another with this code? I can't
pass "$reg" to $c and $t... : \
thanks





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




Re: [PHP] OOP-classes in PHP

2002-11-17 Thread Hatem Ben
just change make your new class global :
class overall {

var $loaded;

function load($class){

eval ("global \$$class;");

eval("\$$class = new $class;");

return true;

}

}

then you can call it using
$overall = new overall;

$overall->load('foo');

// This should work now ;).

$foo->foo();



Hatem

- Original Message - 
From: "Tularis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 17, 2002 11:21 PM
Subject: [PHP] OOP-classes in PHP


> currently I have the followig script:
> 
> everything works fine, except for the fact that it doesn't seem to 
> understand $overall->foo->foo();. It returns this error:
> "Fatal error: Call to a member function on a non-object in 
> d:\apache\htdocs\classes.php on line 32"
> 
> Now, I know the object is loaded, because the constructor is run, and 
> puts out a 1 onscreen... I wish to know how to make this work...
> any help plz?
> 
> thanx
> - Tularis
>  
> class overall {
> var $loaded;
> 
> function load($class){
> eval("\$$class = new $class;");
> return true;
> }
> }
> 
> class foo {
> var $bar;
> 
> // Constructor
> function foo(){
> if(!isset($this->bar)){
> $this->bar = 1;
> }else{
> $this->bar++;
> }
> echo $this->bar."";
> }
> }
> 
> // Start actual loading
> $overall = new overall;
> $overall->load('foo');
> 
> // As of here it won't work anymore... somehow $overall->foo-> doesn't 
> work...
> 
> $overall->foo->foo();
> ?>
> 
> (and if possible, I would also like to change $overall->foo->foo() to 
> $foo->foo(), but still keeping that class as a 'subclass' to the overall 
> one.)
> 
> 
> -- 
> 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] damn it... i want to tranfer data from one table to another!

2002-11-17 Thread John W. Holmes
> Why i can't tranfer data from one table to another with this code? I
can't
> pass "$reg" to $c and $t... : \
> thanks
> 
>   $ligacao=mysql_connect("localhost","","") or die (mysql_error());
>  $real="INSERT INTO divx (titulo,cds) VALUES ('$t','$c')";

move the above line...

>  $temp="SELECT * FROM divxtemp";
>  //$num=mysql_affected_rows();
>  $restemp=mysql_db_query("DB_nac31915",$temp) or die (mysql_error());
>  if ($ligacao)
>  {
>   while($reg=mysql_fetch_array($restemp))
>   {
>$t=$reg["titulo"];
>$c=$reg["cds"];

to here...

>mysql_db_query("DB_nac31915",$real) or die (mysql_error());
>   }
>  }
>   mysql_close();
> ?>

The problem you're having is that $t and $c are evaluated when you
assign that string to $real, NOT when it's used in mysql_db_query().
Since they are empty at that time, you're creating a SQL statement
that's ... VALUES ('','') and executing it every time.

Also, the mysql_db_query() function is depreciated. You'll have to use
mysql_select_db() to select the database you want to use, then use
mysql_query() to issue your queries. 

---John Holmes...



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




[PHP] preg_replace_callback

2002-11-17 Thread Bikeman
Hello.

I have totally no clue at all wether I am posting in the right newsgroup
here, and I was not planning on caching all messages in my (first time used,
I prefer Outlook) Outlook Express before searching.  So if I am disobeying
all rules here ...  I'm sorry ...  I just am not an experienced news-service
user ...

Now, my question/remark/bug report.  It concerns, ad you could guess, the
preg_replace_callback function.  The manual is very short on this function,
and the comments posted on the online-version of the manual, are not helping
me, either ...  I am trying to use this function as the regular preg_replace
can be used, namely woth a patterns-array, a replacement-array (which gets
the callback-array) and a subject.  This doesn't work, though ...  It
appears as if the callback-variant of the preg_replace version isn't capable
of handling multiple patterns at a time.  This is the error-message I get:
"Warning: preg_replace_callback() requires argument 2, 'Array', to be a
valid callback in ...".  I pass it, as a second argument, an Array that
consists of strings containing the names of functions I defined later in my
php-file.  (Hmmm ...  Could that be the problem?  Tha fact that I define the
functions AFTER I give the Array tot the functions?  Don't think so, though
...)

Did anybody have the same experience, or am I really doing something wrong?

Tnx in advance for any reply!!

Bikeman



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




RE: [PHP] preg_replace_callback

2002-11-17 Thread John W. Holmes
"callback" should be the name of a function that determines what the
matched pattern will be replaced with. 

Maybe you just need the regular preg_replace(), instead of the one with
callback?

---John Holmes...

> -Original Message-
> From: Bikeman [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 2:23 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-
> [EMAIL PROTECTED]
> Subject: [PHP] preg_replace_callback
> 
> Hello.
> 
> I have totally no clue at all wether I am posting in the right
newsgroup
> here, and I was not planning on caching all messages in my (first time
> used,
> I prefer Outlook) Outlook Express before searching.  So if I am
disobeying
> all rules here ...  I'm sorry ...  I just am not an experienced news-
> service
> user ...
> 
> Now, my question/remark/bug report.  It concerns, ad you could guess,
the
> preg_replace_callback function.  The manual is very short on this
> function,
> and the comments posted on the online-version of the manual, are not
> helping
> me, either ...  I am trying to use this function as the regular
> preg_replace
> can be used, namely woth a patterns-array, a replacement-array (which
gets
> the callback-array) and a subject.  This doesn't work, though ...  It
> appears as if the callback-variant of the preg_replace version isn't
> capable
> of handling multiple patterns at a time.  This is the error-message I
get:
> "Warning: preg_replace_callback() requires argument 2, 'Array', to be
a
> valid callback in ...".  I pass it, as a second argument, an Array
that
> consists of strings containing the names of functions I defined later
in
> my
> php-file.  (Hmmm ...  Could that be the problem?  Tha fact that I
define
> the
> functions AFTER I give the Array tot the functions?  Don't think so,
> though
> ...)
> 
> Did anybody have the same experience, or am I really doing something
> wrong?
> 
> Tnx in advance for any reply!!
> 
> Bikeman
> 
> 
> 
> --
> 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] PHP Script to remove attachments from emails and store them on the server

2002-11-17 Thread Simon Chilmaid
Hi all

I have a script that is currently running on my server which intercepts
messages being sent into a specific address, it is piped to this through an
alias in the aliases file. What would I need to add to this script in order
for it to firstly check for the presence of attachments to any email message
and secondly if any are detected how can these be saved to disk locally on
the server that this is running on

Thanks

Simon



RE: [PHP] coding special characters in html

2002-11-17 Thread John W. Holmes
> I'm cooking tothether a tiny php html editor right now, (textarea kind
> of thing). To treat the text properly I need to encode characters like
> '"', '<', '>', and friends into something that doesn't confuse the
> browser.

Htmlentities() or htmlspecialchars()
 
> By the way, do you think encoding and decoding special characters like
> this may replace addslashes() and stripslashes()? The html pages will
> be stored in a MySQL database.

No. There is no HTML entity for the single quote, so those will remain
unchanged. If you use all double quotes for string delimiters in your
queries, then you could skip addslashes(). 
 
> Also, addslashes() will reduce the chance of bad stuff being passed to
> MySQL. But is there a function which stops client-side scripts in
> whatever is entered by the user?

No, not really. Using strip_tags() or htmlentities() is the best way to
go on user data. It will prevent the HTML or JS that's in the input from
being evaluated.

---John Holmes...



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




[PHP] PHP 4.2.3 on Apache 2.0.39

2002-11-17 Thread rija
Hi Guys

I'm installing PHP 4.2.3 on Apache Server 2.0.41.
If I try localhost or localhost/manual it work perfectly,

Now I want to run my php program, I developed on IIS 5.0 environment, on my new Apache 
server
I get the message below , and my browser display HTTP 400 - BAD request page, which 
means The page cannot be found although all the files are there.


[Mon Nov 18 11:04:28 2002] [error] [client 127.0.0.1] Invalid URI in request GET 
/domains/home.php HTTP/1.1, referer: http://localhost/domains/

I put these few line in my httpd.conf
  a.. ScriptAlias /php/ "c:/php/" 

  b.. AddType application/x-httpd-php .php .phtml 

  c.. Action application/x-httpd-php "/php/php.exe"





Re: [PHP] Searching a Table

2002-11-17 Thread Justin French
READ THE MYSQL MANUAL -- IT DOCUMENTS EVERYTHING.

Justin


on 18/11/02 2:19 AM, Stephen ([EMAIL PROTECTED]) wrote:

> Thanks, this is what I was looking for. But does it ommit common words like
> 'it' or 'the?'
> 
> 
> - Original Message -
> From: "Marco Tabini" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Saturday, November 16, 2002 10:47 PM
> Subject: Re: [PHP] Searching a Table
> 
> 
>> Ok, then you can use FULLTEXT queries.
>> 
>> Take a look here:
>> 
>> http://www.mysql.com/doc/en/Fulltext_Search.html
>> 
>> 
>> Marco
>> 
>> On Sat, 2002-11-16 at 22:49, Stephen wrote:
>>> I don't have control of my server, it's hosted. All my content is in a
> MySQL
>>> database and is outputed through a php page that selects the information
>>> from an id variable passed through the URL...
>>> 
>>> 
>>> - Original Message -
>>> From: "Marco Tabini" <[EMAIL PROTECTED]>
>>> To: "Stephen" <[EMAIL PROTECTED]>
>>> Cc: "PHP List" <[EMAIL PROTECTED]>
>>> Sent: Saturday, November 16, 2002 10:38 PM
>>> Subject: Re: [PHP] Searching a Table
>>> 
>>> 
 Well, if you're using a database, say MySQL, you can look at FREETEXT
 indexes and queries. If you want to index your web pages, you should
> be
 looking at a search engine that works with your web server. For
> example,
 ht:dig (http://www.htdig.org/) works with Apache.
 
 
 Marco
 
 --
 
 php|architect - The magazine for PHP Professionals
 The first monthly worldwide magazine dedicated to PHP programmers
 Check us out on the web at http://www.phparch.com
 
 
 
 On Sat, 2002-11-16 at 22:40, Stephen wrote:
> I need to make a search engine for my site. Instead of making a
> table
>>> with all the words of my content of my reviews, I need to make it
> simple.
>>> How could you search a table of articles (let's say game_reviews) by
>>> comparing keywords the user types in, to the text of the article? All
> the
>>> tutorials I can find make a table with a list of words of every single
>>> keyword...
> 
> 
> Thanks,
> Stephen Craton
> http://www.melchior.us
> 
> "Life is a gift from God. Wasting it is like destroying a gift you
> got
>>> from the person you love most." -- http://www.melchior.us
> 
> 
 
> --
> 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
 
 
>>> 
>> 
>> 
>> 
> 

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




Re: [PHP] Write file can't work ?!? :-(

2002-11-17 Thread rija
Try to change write permission doing like the following:
- Right click on the folder
- Select proprieties
- Click on security icon
- And allow everyone to write, read, execute

If you cannot access this tools, ask your administrator to allow you to do
this work.


- Original Message -
From: "Ivan Marenic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 7:21 AM
Subject: Re: [PHP] Write file can't work ?!? :-(


> Here is IIS permisin setting. Watch attachment.
>
> Thanks for help!


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


[PHP] PHP Application Framework

2002-11-17 Thread Michael She
Hi all,


Does anyone have a recommendation for a stable yet flexible application 
framework for PHP?

Something similar to Midgard that will run on Windows would be nice.

Thanks!
--
 _  _
| ||   __| : Michael She  : [EMAIL PROTECTED]
| | | ||__   | : Mobile   : (519) 589-7309
|_|_|_||_| : WWW Homepage : http://www.binaryio.com/



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



[PHP] imap_open

2002-11-17 Thread Bill Rowell

i'm looking for information on how to open mailboxes stored in user
directories using imap_open.  i've lookd into the c-client documentation
as well as php.net and haven't had any luck.  my experience so far is that imap_open 
will
just open a mailbox stored in /var/spool/mail.

has anyone out there tried such a thing and had success?  any help anyone
can provide would be great.

-bill


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




RE: [PHP] preg_replace_callback

2002-11-17 Thread Philip Olson


Please make all replies to this ONLY go to php-general, thank you.



On Sun, 17 Nov 2002, John W. Holmes wrote:

> "callback" should be the name of a function that determines what the
> matched pattern will be replaced with. 
> 
> Maybe you just need the regular preg_replace(), instead of the one with
> callback?
> 
> ---John Holmes...
> 
> > -Original Message-
> > From: Bikeman [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, November 17, 2002 2:23 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-
> > [EMAIL PROTECTED]
> > Subject: [PHP] preg_replace_callback
> > 
> > Hello.
> > 
> > I have totally no clue at all wether I am posting in the right
> newsgroup
> > here, and I was not planning on caching all messages in my (first time
> > used,
> > I prefer Outlook) Outlook Express before searching.  So if I am
> disobeying
> > all rules here ...  I'm sorry ...  I just am not an experienced news-
> > service
> > user ...
> > 
> > Now, my question/remark/bug report.  It concerns, ad you could guess,
> the
> > preg_replace_callback function.  The manual is very short on this
> > function,
> > and the comments posted on the online-version of the manual, are not
> > helping
> > me, either ...  I am trying to use this function as the regular
> > preg_replace
> > can be used, namely woth a patterns-array, a replacement-array (which
> gets
> > the callback-array) and a subject.  This doesn't work, though ...  It
> > appears as if the callback-variant of the preg_replace version isn't
> > capable
> > of handling multiple patterns at a time.  This is the error-message I
> get:
> > "Warning: preg_replace_callback() requires argument 2, 'Array', to be
> a
> > valid callback in ...".  I pass it, as a second argument, an Array
> that
> > consists of strings containing the names of functions I defined later
> in
> > my
> > php-file.  (Hmmm ...  Could that be the problem?  Tha fact that I
> define
> > the
> > functions AFTER I give the Array tot the functions?  Don't think so,
> > though
> > ...)
> > 
> > Did anybody have the same experience, or am I really doing something
> > wrong?
> > 
> > Tnx in advance for any reply!!
> > 
> > Bikeman
> > 
> > 
> > 
> > --
> > 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] how do I get for to display $_POST value?

2002-11-17 Thread Jeff Bluemel
OK...  I have the following code which works perfect.  however, when submit
is pressed I would like it to display the pin number in the form again.


8

 Pin :
 
 

 Batch :
 
 Serial :
 





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




Re: [PHP] how do I get for to display $_POST value?

2002-11-17 Thread John Nichel


Jeff Bluemel wrote:
OK...  I have the following code which works perfect.  however, when submit
is pressed I would like it to display the pin number in the form again.


8

 Pin :
 
 

 Batch :
 
 Serial :
 








--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


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




Re: [PHP] how do I get for to display $_POST value?

2002-11-17 Thread Jeff Bluemel
I didn't know I could set a value on that...  thanks for the info.


"John Nichel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>  maxlength="20">
>
> Jeff Bluemel wrote:
> > OK...  I have the following code which works perfect.  however, when
submit
> > is pressed I would like it to display the pin number in the form again.
> >
> >  > name="search">
> > 8
> > 
> >  Pin :
> >  
> >   > style="background-color:#C2C2C2" name="submit" value="Find Pin" >
> > 
> >  Batch :
> >  
> >  Serial :
> >  
> > 
> > 
> >
> >
> >
>
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
>



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




[PHP] Query to select every other record

2002-11-17 Thread Darren McPhee
Does anybody know of a SELECT QUERY that will select every other record of a
table ?  I want to do this so that I can display my products in 2 columns (I
will also be using arrays of course).

The first column would show the result of the first query starting at record
1.  The second column would show the result of the second query starting at
record 2.  Each query just needs to skip a record so that products are
ordered correctly (1,2 in first row.  3,4 in second row...)

And I want the query to work without relying on ID fields.  The reason being
is that when you delete a record, you can end up with a column ID of say
1,2,3,5 (like if you delete record 4).

Originally, I set up my tables up using Dreamweaver with repeat regions.
But that's only ok if you want one record per row going down vertically.
The Macromedia web site does show you how to display all your records
repeating horizontally but doesn't tell you how to limit to 2 columns.  So
both ways are useless to me.

Darren.



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




Re: [PHP] Whois Search in PHP

2002-11-17 Thread Chandu Nannapaneni
Hah,

U gave just what I wanted. Good tip.

/Chandu
- Original Message - 
From: "John Nichel" <[EMAIL PROTECTED]>
To: "Chandu Nannapaneni" <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 3:42 AM
Subject: Re: [PHP] Whois Search in PHP


> You could just do this, if you don't mind making a system call...
> 
> echo `whois $domain`;
> 
> Chandu Nannapaneni wrote:
> > Hi guys,
> > 
> > I have just downloaded whois2.php
> > from http://www.easydns.com/~markjr/whois2/
> > 
> > 
> > It's working great except for certain domains, 
> > for ex : google.com is being shown as available.
> > 
> > I am in need of a good PHP script which gives me
> > accurate results about availability of domains.
> > 
> > /Chandu
> > 
> > 
> 
> 
> -- 
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
> 
> 
> 


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




[PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread desmond west
#20 BOTHA CRESCENT,
SADTON,JOHANNESBURG,
SOUTH AFRICA.
Tel/Fax:+:+27-834377724
E-mail:[EMAIL PROTECTED]

Dear sir,

In order to transfer out (USD 126 M) One hundred
and
twenty six million United States Dollars) from
NED Bank in south africa. I have the courage to ask
you
to
look for a reliable and honest person who will be
capable for this important business believing
that
you
will never let me down either now or in future.

I am Mr. DESMOND WEST,the Chief auditor of
NED Bank in south africa.
There is an account opened in this bank in 1980
and
since 1990 nobody has operated on this account
again.
After going through some old files in the
records,
I
discovered that if I do not remit this money out
urgently it would be forfeited for nothing. The
owner
of this account is Mr. ADAMS .H. NICOLES, a
foreigner,
profession and he died since 1990. No other
person
knows about this account or any thing concerning
it,
the account has no other beneficiary and my
investigation proved to me as well that this
company
does not know anything about this account and the
amount involved is (USD 126M) One hundred and
twenty
six million United States Dollars million
dollars.

I want to first transfer USDM twenty six million
United States Dollars from this money into a safe
foreigners account abroad before the rest, but I
don't
know any foreigner.
I am only contacting you as a foreigner because
this
money cannot be approved to a local bank here,
but
can
only be approved to any foreign account because
the
money is in us dollars and the former owner of
the
account is Mr. ADAMS .H. NICOLES he is a foreigner
too.

I know that this message will come to you as a
surprise as we don't know ourselves before. We
will
sign an agreement, but be sure that it is real
and
a
genuine business.

I only got your contact address from my secretary
who operates computer, with believe in God that
you
will never let me down in this business. You are
the
only person that I have contacted in this
business;
so
please reply urgently so that I will inform you
the
next step to take immediately.
Send also your private telephone and fax number
including the full details of the account to be
used
for the deposit. I want us to meet face to face
or
sign a binding agreement to bind us together so
that
you can receive this money into a foreign account
or
any account of your choice where the fund will be
safe. And I will fly to your country for
withdrawal
and sharing and other investments.

I am contacting you because of the need to
involve
a
foreigner with foreign account and foreign
beneficiary. I need your full co-operation to
make
this work fine because the management is ready to
approve this payment to any foreigner, who has
correct

information of this account, which I will give to
you


later immediately, if you are able and with
capability
to handle such amount in strict confidence and
trust
according to my instructions and advice for our
mutual
benefit because this opportunity will never come
again
in my life. I need truthful person in this
business
because I don't want to make mistake I need your
strong assurance and trust.

With my position now in the office I can transfer
this money to any foreigner's reliable account, which
you


can provide with assurance that this money will
be
intact pending my physical arrival in your
country
for
sharing. I will destroy all documents of
transaction
immediately we receive this money leaving no
trace
to
any place. You can also come to discuss with me
face
to face after which I will make this remittance
in
your presence and two of us will fly to your
country
at least two days ahead of the money going into
the
account.

I will apply for annual leave to get visa
immediately
I hear from you that you are ready to act and
receive
this fund in your account. I will use my position
and
influence to effect legal approvals and onward
transfer of this money to your account with
appropriate clearance forms of the ministries and
foreign exchange departments.

At the conclusion of this business, you will be
given
35% of the total amount, 60% will be for me,
while
5%
will be for expenses both parties might have
incurred
during the process of transferring.

I look forward to your earliest reply.
Or by my Tel/Fax:+27-834377724

Yours truly,
MR.DESMOND WEST




__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread Marco Tabini
This is great!

Don't anybody tell anyone... wait! 

:-)


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




[PHP] Problem with Class - incomplete object error

2002-11-17 Thread Paul
Hi All:

I have a simple page that checks for existence of object in a session.
If the object is not stored in session object, it creates new one:

If (isset ($_SESSION["cart"])) {
$cart=$_SESSION["cart"];
} else {
$cart = new ShoppingCart ();
$_SESSION["cart"]= $cart;
}   

So the object cart is available in every page. At this point the cart is
a simple class:

class ShoppingCart {

var $items = array();

function AddItem ($item){
if ($this->items[$item]) {
$this->items[$item]=$this->items[$item]+1;
} else { 
$this->items[$item]=1;
}   
} // additem
}

So the cart is either retrieved from the session or created (if non
existent), however, every time the script calls :
$cart->AddItem($_GET['item_id']);

I get the following error:
Fatal error: The script tried to execute a method or access a property
of an incomplete object. Please ensure that the class definition
shoppingcart of the object you are trying to operate on was loaded
_before_ the session was started in  on line 59

Where line 59 is pointing to $cart->AddItem($_GET['item_id'])

Session_start is present in every page.

Could anyone help me understand where the problem is? 

Thanks
Paul



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




RE: [PHP] Query to select every other record

2002-11-17 Thread John W. Holmes
Okay, stop and take a break. Now come back to the problem and ask
yourself how you can display the results, two at a time on each row.
After you display every second item, you want to end the row and start
another one. Something like this...

";
while($r = mysql_fetch_row($result))
{
  echo "show your data here, $r[0], $r[1], etc...";
  if($i++ & 1) { echo "\n"; }
}
echo "";
?>

but you'll have to come up with a way to handle an odd number of rows
being returned and making it format the table properly, etc...

Hope that helps.

---John Holmes...

> -Original Message-
> From: Darren McPhee [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 17, 2002 9:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Query to select every other record
> 
> Does anybody know of a SELECT QUERY that will select every other
record of
> a
> table ?  I want to do this so that I can display my products in 2
columns
> (I
> will also be using arrays of course).
> 
> The first column would show the result of the first query starting at
> record
> 1.  The second column would show the result of the second query
starting
> at
> record 2.  Each query just needs to skip a record so that products are
> ordered correctly (1,2 in first row.  3,4 in second row...)
> 
> And I want the query to work without relying on ID fields.  The reason
> being
> is that when you delete a record, you can end up with a column ID of
say
> 1,2,3,5 (like if you delete record 4).
> 
> Originally, I set up my tables up using Dreamweaver with repeat
regions.
> But that's only ok if you want one record per row going down
vertically.
> The Macromedia web site does show you how to display all your records
> repeating horizontally but doesn't tell you how to limit to 2 columns.
So
> both ways are useless to me.
> 
> Darren.
> 
> 
> 
> --
> 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] Query to select every other record

2002-11-17 Thread David Freeman

 > Does anybody know of a SELECT QUERY that will select every 
 > other record of a
 > table ?  I want to do this so that I can display my products 
 > in 2 columns (I
 > will also be using arrays of course).

Don't know of a select that'll do it, but then I don't really understand
why you'd want to either.

(UNCHECKED psuedo code)
$query_result = mysql_query("whatever");

Check_that_you_got_a_result();
{
  start_your_html_table_to_display_stuff();
  start_first_row_of_table();

  while(grab_a_row_from_query_result())
  {
if (havent_started_first_column())
{
  print_a_line_of_data();
  close_first_column();
  start_second_column();
} else {
  print_a_line_of_data();
  close_second_column();
  close_table_row();
  start_table_row();
}
  }
  if (still_in_first_column())
  {
close_column();
  }
  close_table();
}

Well, something like that anyway - I haven't fully considered closing
off your rows and table properly but that's pretty much what I'd do to
make this work, and it still only needs one db query.

CYA, Dave




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




[PHP] testing

2002-11-17 Thread rw


not sure how to post

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




[PHP] sending html email from a web-based form

2002-11-17 Thread rw
Here is the code that is supposed to do what I want:

$headers = "From: \"$name $last\" <$email>\n" . "Reply-To: <$email>\n\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1"; 
mail($to, $subject, $msg, $headers) or die ("Mail not sent.!");

Instead, I get all of the raw code in the email.

Any suggestions?

Thanks

RW


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




[PHP] Problem whith query in query

2002-11-17 Thread Lars Espelid
Hello,

I need some help whith a mysql-query. Can anyone help?
Is there a good newsgroup for mysql?

Identifiseringid is the primary key of the table identifisering and is
autoincrement.
There is also a coloumn named dprosjekt in identifisering and some other
coloumns.
dprosjekt has the same value for several tuples.
For each unike dprosjekt I want to print the record where identifiseringid
is max.

I tought this would work, but it won't:

SELECT * FROM identifisering as i
WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid)
FROM identifisering as ii
GROUP BY dprosjekt);

also tried:

SELECT * FROM identifisering as i
WHERE i.identifiseringid IN (SELECT MAX(ii.identifiseringid)
FROM identifisering as ii
GROUP BY dprosjekt);

When I split the query they work:

SELECT * FROM identifisering as i
WHERE i.identifiseringid='123';

SELECT MAX(ii.identifiseringid)
FROM identifisering as ii
GROUP BY dprosjekt;



Thanks,

Lars




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




RE: [PHP] sending html email from a web-based form

2002-11-17 Thread John W. Holmes
> Here is the code that is supposed to do what I want:
> 
> $headers = "From: \"$name $last\" <$email>\n" . "Reply-To:
<$email>\n\n";

Try taking out the extra newline (\n) you have in the above line.
Actually, the headers are supposed to be separated by \r\n, instead of
just \n, also.

---John Holmes...



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




RE: [PHP] sending html email from a web-based form

2002-11-17 Thread rw
Well now, that was easy!

Thank you!

Quoting "John W. Holmes" <[EMAIL PROTECTED]>:

### > Here is the code that is supposed to do what I want:
### > 
### > $headers = "From: \"$name $last\" <$email>\n" . "Reply-To:
### <$email>\n\n";
### 
### Try taking out the extra newline (\n) you have in the above line.
### Actually, the headers are supposed to be separated by \r\n, instead of
### just \n, also.
### 
### ---John Holmes...
### 
### 
### 




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




Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread Khalid El-Kary
oh i caught you, i'll go before you :-)

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


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



Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread Aaron
idiot.

desmond west wrote:


#20 BOTHA CRESCENT,
SADTON,JOHANNESBURG,
SOUTH AFRICA.
Tel/Fax:+:+27-834377724
E-mail:[EMAIL PROTECTED]

Dear sir,

In order to transfer out (USD 126 M) One hundred
and
twenty six million United States Dollars) from
NED Bank in south africa. I have the courage to ask
you
to
look for a reliable and honest person who will be
capable for this important business believing
that
you
will never let me down either now or in future.

I am Mr. DESMOND WEST,the Chief auditor of
NED Bank in south africa.
There is an account opened in this bank in 1980
and
since 1990 nobody has operated on this account
again.
After going through some old files in the
records,
I
discovered that if I do not remit this money out
urgently it would be forfeited for nothing. The
owner
of this account is Mr. ADAMS .H. NICOLES, a
foreigner,
profession and he died since 1990. No other
person
knows about this account or any thing concerning
it,
the account has no other beneficiary and my
investigation proved to me as well that this
company
does not know anything about this account and the
amount involved is (USD 126M) One hundred and
twenty
six million United States Dollars million
dollars.

I want to first transfer USDM twenty six million
United States Dollars from this money into a safe
foreigners account abroad before the rest, but I
don't
know any foreigner.
I am only contacting you as a foreigner because
this
money cannot be approved to a local bank here,
but
can
only be approved to any foreign account because
the
money is in us dollars and the former owner of
the
account is Mr. ADAMS .H. NICOLES he is a foreigner
too.

I know that this message will come to you as a
surprise as we don't know ourselves before. We
will
sign an agreement, but be sure that it is real
and
a
genuine business.

I only got your contact address from my secretary
who operates computer, with believe in God that
you
will never let me down in this business. You are
the
only person that I have contacted in this
business;
so
please reply urgently so that I will inform you
the
next step to take immediately.
Send also your private telephone and fax number
including the full details of the account to be
used
for the deposit. I want us to meet face to face
or
sign a binding agreement to bind us together so
that
you can receive this money into a foreign account
or
any account of your choice where the fund will be
safe. And I will fly to your country for
withdrawal
and sharing and other investments.

I am contacting you because of the need to
involve
a
foreigner with foreign account and foreign
beneficiary. I need your full co-operation to
make
this work fine because the management is ready to
approve this payment to any foreigner, who has
correct

information of this account, which I will give to
you


later immediately, if you are able and with
capability
to handle such amount in strict confidence and
trust
according to my instructions and advice for our
mutual
benefit because this opportunity will never come
again
in my life. I need truthful person in this
business
because I don't want to make mistake I need your
strong assurance and trust.

With my position now in the office I can transfer
this money to any foreigner's reliable account, which
you


can provide with assurance that this money will
be
intact pending my physical arrival in your
country
for
sharing. I will destroy all documents of
transaction
immediately we receive this money leaving no
trace
to
any place. You can also come to discuss with me
face
to face after which I will make this remittance
in
your presence and two of us will fly to your
country
at least two days ahead of the money going into
the
account.

I will apply for annual leave to get visa
immediately
I hear from you that you are ready to act and
receive
this fund in your account. I will use my position
and
influence to effect legal approvals and onward
transfer of this money to your account with
appropriate clearance forms of the ministries and
foreign exchange departments.

At the conclusion of this business, you will be
given
35% of the total amount, 60% will be for me,
while
5%
will be for expenses both parties might have
incurred
during the process of transferring.

I look forward to your earliest reply.
Or by my Tel/Fax:+27-834377724

Yours truly,
MR.DESMOND WEST




__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

 





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




[PHP] Re: STRICTLY CONFIDENCIAL

2002-11-17 Thread OrangeHairedBoy
Obviously the "Chief auditor of NED Bank in south africa" must need to be
pretty well educated for the job. I can tell by the POS sentence "One
hundred and twenty six million United States Dollars million dollars".

I'm sorry...how many million United States Dollars million dollars? Right...

Not to mention the fact that he sent something labeled "STRICTLY
CONFIDENCIAL" (spelled wrong) to a NEWSGROUP?

I take pleasure in reading such BS. Thanks for the laugh Mr. West!!!



"Desmond west" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> #20 BOTHA CRESCENT,
> SADTON,JOHANNESBURG,
> SOUTH AFRICA.
> Tel/Fax:+:+27-834377724
> E-mail:[EMAIL PROTECTED]
>
> Dear sir,
>
> In order to transfer out (USD 126 M) One hundred
> and
> twenty six million United States Dollars) from
> NED Bank in south africa. I have the courage to ask
> you
> to
> look for a reliable and honest person who will be
> capable for this important business believing
> that
> you
> will never let me down either now or in future.
>
> I am Mr. DESMOND WEST,the Chief auditor of
> NED Bank in south africa.
> There is an account opened in this bank in 1980
> and
> since 1990 nobody has operated on this account
> again.
> After going through some old files in the
> records,
> I
> discovered that if I do not remit this money out
> urgently it would be forfeited for nothing. The
> owner
> of this account is Mr. ADAMS .H. NICOLES, a
> foreigner,
> profession and he died since 1990. No other
> person
> knows about this account or any thing concerning
> it,
> the account has no other beneficiary and my
> investigation proved to me as well that this
> company
> does not know anything about this account and the
> amount involved is (USD 126M) One hundred and
> twenty
> six million United States Dollars million
> dollars.
>
> I want to first transfer USDM twenty six million
> United States Dollars from this money into a safe
> foreigners account abroad before the rest, but I
> don't
> know any foreigner.
> I am only contacting you as a foreigner because
> this
> money cannot be approved to a local bank here,
> but
> can
> only be approved to any foreign account because
> the
> money is in us dollars and the former owner of
> the
> account is Mr. ADAMS .H. NICOLES he is a foreigner
> too.
>
> I know that this message will come to you as a
> surprise as we don't know ourselves before. We
> will
> sign an agreement, but be sure that it is real
> and
> a
> genuine business.
>
> I only got your contact address from my secretary
> who operates computer, with believe in God that
> you
> will never let me down in this business. You are
> the
> only person that I have contacted in this
> business;
> so
> please reply urgently so that I will inform you
> the
> next step to take immediately.
> Send also your private telephone and fax number
> including the full details of the account to be
> used
> for the deposit. I want us to meet face to face
> or
> sign a binding agreement to bind us together so
> that
> you can receive this money into a foreign account
> or
> any account of your choice where the fund will be
> safe. And I will fly to your country for
> withdrawal
> and sharing and other investments.
>
> I am contacting you because of the need to
> involve
> a
> foreigner with foreign account and foreign
> beneficiary. I need your full co-operation to
> make
> this work fine because the management is ready to
> approve this payment to any foreigner, who has
> correct
>
> information of this account, which I will give to
> you
>
>
> later immediately, if you are able and with
> capability
> to handle such amount in strict confidence and
> trust
> according to my instructions and advice for our
> mutual
> benefit because this opportunity will never come
> again
> in my life. I need truthful person in this
> business
> because I don't want to make mistake I need your
> strong assurance and trust.
>
> With my position now in the office I can transfer
> this money to any foreigner's reliable account, which
> you
>
>
> can provide with assurance that this money will
> be
> intact pending my physical arrival in your
> country
> for
> sharing. I will destroy all documents of
> transaction
> immediately we receive this money leaving no
> trace
> to
> any place. You can also come to discuss with me
> face
> to face after which I will make this remittance
> in
> your presence and two of us will fly to your
> country
> at least two days ahead of the money going into
> the
> account.
>
> I will apply for annual leave to get visa
> immediately
> I hear from you that you are ready to act and
> receive
> this fund in your account. I will use my position
> and
> influence to effect legal approvals and onward
> transfer of this money to your account with
> appropriate clearance forms of the ministries and
> foreign exchange departments.
>
> At the conclusion of this business, you will be
> given
> 35% of the total amount, 60% will be for me,
> while

[PHP] Re: Problem whith query in query

2002-11-17 Thread OrangeHairedBoy
MySQL doesn't support queries inside queries.

I think it's on their TODO list...


SELECT * FROM identifisering as i
> WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid)
> FROM identifisering as ii
> GROUP BY dprosjekt);


"Lars Espelid" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I need some help whith a mysql-query. Can anyone help?
> Is there a good newsgroup for mysql?
>
> Identifiseringid is the primary key of the table identifisering and is
> autoincrement.
> There is also a coloumn named dprosjekt in identifisering and some other
> coloumns.
> dprosjekt has the same value for several tuples.
> For each unike dprosjekt I want to print the record where identifiseringid
> is max.
>
> I tought this would work, but it won't:
>
> SELECT * FROM identifisering as i
> WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid)
> FROM identifisering as ii
> GROUP BY dprosjekt);
>
> also tried:
>
> SELECT * FROM identifisering as i
> WHERE i.identifiseringid IN (SELECT MAX(ii.identifiseringid)
> FROM identifisering as ii
> GROUP BY dprosjekt);
>
> When I split the query they work:
>
> SELECT * FROM identifisering as i
> WHERE i.identifiseringid='123';
>
> SELECT MAX(ii.identifiseringid)
> FROM identifisering as ii
> GROUP BY dprosjekt;
>
>
>
> Thanks,
>
> Lars
>
>
>



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




Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread Aaron
obviously yes.

the poor grammer, the uk based yahoo email account.
The fact that the moron posted it to a email list.
I've heard this scam before.
and recieved email for it before.

Lejanson C. Go wrote:


scam

Aaron wrote:


idiot.

desmond west wrote:


#20 BOTHA CRESCENT,
SADTON,JOHANNESBURG,
SOUTH AFRICA.
Tel/Fax:+:+27-834377724
E-mail:[EMAIL PROTECTED]

Dear sir,

In order to transfer out (USD 126 M) One hundred
and
twenty six million United States Dollars) from
NED Bank in south africa. I have the courage to ask
you
to
look for a reliable and honest person who will be
capable for this important business believing
that
you
will never let me down either now or in future.

I am Mr. DESMOND WEST,the Chief auditor of
NED Bank in south africa.
There is an account opened in this bank in 1980
and
since 1990 nobody has operated on this account
again.
After going through some old files in the
records,
I
discovered that if I do not remit this money out
urgently it would be forfeited for nothing. The
owner
of this account is Mr. ADAMS .H. NICOLES, a
foreigner,
profession and he died since 1990. No other
person
knows about this account or any thing concerning
it,
the account has no other beneficiary and my
investigation proved to me as well that this
company
does not know anything about this account and the
amount involved is (USD 126M) One hundred and
twenty
six million United States Dollars million
dollars.

I want to first transfer USDM twenty six million
United States Dollars from this money into a safe
foreigners account abroad before the rest, but I
don't
know any foreigner.
I am only contacting you as a foreigner because
this
money cannot be approved to a local bank here,
but
can
only be approved to any foreign account because
the
money is in us dollars and the former owner of
the
account is Mr. ADAMS .H. NICOLES he is a foreigner
too.

I know that this message will come to you as a
surprise as we don't know ourselves before. We
will
sign an agreement, but be sure that it is real
and
a
genuine business.

I only got your contact address from my secretary
who operates computer, with believe in God that
you
will never let me down in this business. You are
the
only person that I have contacted in this
business;
so
please reply urgently so that I will inform you
the
next step to take immediately.
Send also your private telephone and fax number
including the full details of the account to be
used
for the deposit. I want us to meet face to face
or
sign a binding agreement to bind us together so
that
you can receive this money into a foreign account
or
any account of your choice where the fund will be
safe. And I will fly to your country for
withdrawal
and sharing and other investments.

I am contacting you because of the need to
involve
a
foreigner with foreign account and foreign
beneficiary. I need your full co-operation to
make
this work fine because the management is ready to
approve this payment to any foreigner, who has
correct

information of this account, which I will give to
you


later immediately, if you are able and with
capability
to handle such amount in strict confidence and
trust
according to my instructions and advice for our
mutual
benefit because this opportunity will never come
again
in my life. I need truthful person in this
business
because I don't want to make mistake I need your
strong assurance and trust.

With my position now in the office I can transfer
this money to any foreigner's reliable account, which
you


can provide with assurance that this money will
be
intact pending my physical arrival in your
country
for
sharing. I will destroy all documents of
transaction
immediately we receive this money leaving no
trace
to
any place. You can also come to discuss with me
face
to face after which I will make this remittance
in
your presence and two of us will fly to your
country
at least two days ahead of the money going into
the
account.

I will apply for annual leave to get visa
immediately
I hear from you that you are ready to act and
receive
this fund in your account. I will use my position
and
influence to effect legal approvals and onward
transfer of this money to your account with
appropriate clearance forms of the ministries and
foreign exchange departments.

At the conclusion of this business, you will be
given
35% of the total amount, 60% will be for me,
while
5%
will be for expenses both parties might have
incurred
during the process of transferring.

I look forward to your earliest reply.
Or by my Tel/Fax:+27-834377724

Yours truly,
MR.DESMOND WEST




__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

 













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




[PHP] Re: Minutes to hours/days/monthes/years?

2002-11-17 Thread OrangeHairedBoy
OK...I wrote this...is this what you want?


return english_time("64925149");

function english_time($minutes)
{
while ($minutes>=525600) {$years++;$minutes-=525600;}
while ($minutes>=1440) {$days++;$minutes-=1440;}
while ($minutes>=60) {$hours++;$minutes-=60;}
if ($years) { $string[] = ( $years == 1) ? "1 year" : "$years years"; }
if ($days) { $string[] = ( $days == 1) ? "1 day" : "$days days"; }
if ($hours) { $string[] = ( $hours == 1) ? "1 hour" : "$hours hours"; }
if ($minutes) { $string[] = ( $minutes == 1) ? "1 minute" : "$minutes
minutes"; }
return implode(", ",$string);
}



"Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm looking for a good way to convert minutes to hours, days, or years -
> the largest it will fit into.  For example, 120 would become "2 hours".
>  90 would become "1 hour and 30 minutes".  Any ideas?
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>



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




Re: [PHP] PHP Script to remove attachments from emails and store them on the server

2002-11-17 Thread Jason Wong
On Monday 18 November 2002 07:34, Simon Chilmaid wrote:
> Hi all
>
> I have a script that is currently running on my server which intercepts
> messages being sent into a specific address, it is piped to this through an
> alias in the aliases file. What would I need to add to this script in order
> for it to firstly check for the presence of attachments to any email
> message and secondly if any are detected how can these be saved to disk
> locally on the server that this is running on

You can have a look at the chapters "IMAP, POP3 and NNTP functions" & 
"mailparse functions" to see if there are any suitable functions there.

What I do is run reformime (google for that if you need to) to extract all 
message parts.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
QOTD:
Silence is the only virtue he has left.
*/


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




Re: [PHP] Re: Problem whith query in query

2002-11-17 Thread Chris Garaffa
On Monday, November 18, 2002, at 12:07  AM, OrangeHairedBoy wrote:

MySQL doesn't support queries inside queries.

I think it's on their TODO list...


Yup, it is.
From :
--Begin quote--
1.8.2 Things That Should be in 4.1

The following features are planned for inclusion into MySQL 4.1. Note 
that because we have many developers that are working on different 
projects, there will also be many additional features. There is also a 
small chance that some of these features will be added to MySQL 4.0. 
Some of the work on MySQL 4.1 is already in progress.

* Subqueries.

SELECT id FROM t WHERE grp IN (SELECT grp FROM g WHERE u > 100);
--End Quote--

I also just did a quick search of the list ("the list" being 
<[EMAIL PROTECTED]>) archive on my computer and got info that 
subqueries will be in 4.1. Unfortunately, 4.0.x is still in beta.


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



Re: [PHP] imap_open

2002-11-17 Thread Michael Sims
On Sun, 17 Nov 2002 21:00:13 -0500 (EST), you wrote:

>i'm looking for information on how to open mailboxes stored in user
>directories using imap_open.  i've lookd into the c-client documentation
>as well as php.net and haven't had any luck.  my experience so far is that imap_open 
>will
>just open a mailbox stored in /var/spool/mail.

The function imap_open() is for opening an connection to an IMAP
server.  It doesn't operate directly on a file system and it is
ignorant of the actual mailbox implementation as this is all
abstracted by the IMAP protocol.  Where the mail is stored is a
function of your IMAP server, not PHP.

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




Re: [PHP] Display cell if dates are between 2 dates - help

2002-11-17 Thread Jason Wong
On Sunday 17 November 2002 18:31, Ray Healy \(Data Net Services\) wrote:

> The startdate and endate columns are "date" format - have any ideas what i
> can do

..."This seems to work BUT if the date in the database is a single number i.e. 
0 to 9 it cannot dispaly it and also if the startdate or endate is a 10, 20 
or 30 it also thinks that it is a 1, 2or 3"...

I'm not sure what you mean by "if the date in the database is a single 
number". DATE columns in MySQL are in this format '-MM-DD', so where is 
the single digit coming from? Anyway could you show a few sample entries from 
your table?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I dote on his very absence.
-- William Shakespeare, "The Merchant of Venice"
*/


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




[PHP] echoing date of first and last day of current week.

2002-11-17 Thread Noodle Snacks
I want to get the unix timestamps of the first and last days of this week...

Currently I have this:

 echo 'Words for the week from '.date('jS F Y',strtotime("last sunday")).'
to '.date('jS F Y',strtotime ("next saturday")).'.';

on saturday this showed the 10th to 23rd... Is there a good way to do this
mathematically (for speed) or can someone think of a better string to parse?


--
JJ Harrison
[EMAIL PROTECTED]



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




[PHP] Re: Minutes to hours/days/monthes/years?

2002-11-17 Thread Jome
> OK...I wrote this...is this what you want?
>
>
> return english_time("64925149");
>
> function english_time($minutes)
> {
> while ($minutes>=525600) {$years++;$minutes-=525600;}
> while ($minutes>=1440) {$days++;$minutes-=1440;}
> while ($minutes>=60) {$hours++;$minutes-=60;}
> if ($years) { $string[] = ( $years == 1) ? "1 year" : "$years years"; }
> if ($days) { $string[] = ( $days == 1) ? "1 day" : "$days days"; }
> if ($hours) { $string[] = ( $hours == 1) ? "1 hour" : "$hours hours"; }
> if ($minutes) { $string[] = ( $minutes == 1) ? "1 minute" : "$minutes
> minutes"; }
> return implode(", ",$string);
> }

I wrote a solution to the same problem, available at
http://www.phpcoded.com/?DO=viewCode&ID=88

I do believe that my solution is more efficent, considering that I use
modulus.

   Jome



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




Re: [PHP] imap_open

2002-11-17 Thread Rasmus Lerdorf
> The function imap_open() is for opening an connection to an IMAP
> server.  It doesn't operate directly on a file system and it is
> ignorant of the actual mailbox implementation as this is all
> abstracted by the IMAP protocol.  Where the mail is stored is a
> function of your IMAP server, not PHP.

That's not actually true.  The imap functions are an abstraction on top of
many different backends, not just imap.  You can talk to pop and nntp
servers as well, for example, and yes, even a local mailstore with no
server involved at all.

-Rasmus


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




  1   2   >