php-general Digest 25 Sep 2007 20:51:00 -0000 Issue 5038

Topics (messages 262439 through 262461):

Re: Regex æøå email validation?
        262439 by: Per Jessen

Re: Data request
        262440 by: Colin Guthrie
        262441 by: Christian Hänsel
        262443 by: Børge Holen
        262447 by: Robert Cummings
        262449 by: Paul Scott

Quota Display function sample
        262442 by: edwardspl.ita.org.mo

read post data as a buffer
        262444 by: David Blanco
        262450 by: Jürgen Wind

Re: article: 7 reasons I switched back to PHP after 2 years   on  Rails
        262445 by: tedd
        262446 by: Robert Cummings

php downlaod script
        262448 by: Hulf
        262451 by: Jason Pruim
        262452 by: Stut
        262454 by: Jim Lucas
        262456 by: brian

Newbie: special characters in regex?
        262453 by: Zembower, Kevin
        262455 by: Al
        262457 by: Edward Kay
        262458 by: brian
        262459 by: Jim Lucas

php auction/bidding system
        262460 by: bruce

Re: Strategy for Secure File Storage
        262461 by: Andrew Ballard

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 ---
Søren Neigaard wrote:

> It works fine, but my friend strangely enough has users with special
> danish letters (æøåÆØÅ) in their email address, and that it does not
> accept. 

Hej Søren

I just realised - you can't have those characters in the email address. 
You may have them in the name part, but not in the address part.  If
you have them in the domain, you need to convert them to punycode
before you validate. 


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
Auto-Deppe, C. Haensel wrote:
> Haha... nice one Col! Just started up my work computer, and the first
> thing I read is your post. Really a good start into the day :o) Thanks.
> 
> Paul: Thanks for the flightgear link. As a FS2004 user I never even
> thought of flightgear, so thanks, I'll have a look at that :o)

I think you missed the Reply All button that this list likes so much....

PS I got nostalgic and had to look up Henry's Cat:
http://www.henryscat.com/ awesome :D

Check out Henry's Cat TV and hit the Jingle episode if you want to hear
the bit I (mis)quoted originally! Oh to be a child again (and not just
settle for having the mental age of one) :p

Col

> ----- Original Message ----- From: "Colin Guthrie" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 24, 2007 6:12 PM
> Subject: Re: Data request
> 
> 
>> Stut wrote:
>>> Have you tried Google? It knows a lot about most things and a little
>>> about the rest.
>>
>> Failing that you could try asking Henry's cat. You must know Henry's
>> cat? He knows everything about nothing and not to much about that. So if
>> you know someone who know what he knows then you must know Henry's
>> cat....
>> </end totally irrelevant 80's cartoon reference>
>>
>> I'll get my coat....
>>
>> Col 
> 


--- End Message ---
--- Begin Message --- "Colin Guthrie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED]
Auto-Deppe, C. Haensel wrote:
Haha... nice one Col! Just started up my work computer, and the first
thing I read is your post. Really a good start into the day :o) Thanks.

Paul: Thanks for the flightgear link. As a FS2004 user I never even
thought of flightgear, so thanks, I'll have a look at that :o)

I think you missed the Reply All button that this list likes so much....

PS I got nostalgic and had to look up Henry's Cat:
http://www.henryscat.com/ awesome :D

Check out Henry's Cat TV and hit the Jingle episode if you want to hear
the bit I (mis)quoted originally! Oh to be a child again (and not just
settle for having the mental age of one) :p

Col

Heck, I am turning 30 at the end of next month :o( Quit talking about age *big grin*




----- Original Message ----- From: "Colin Guthrie" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Monday, September 24, 2007 6:12 PM
Subject: Re: Data request


Stut wrote:
Have you tried Google? It knows a lot about most things and a little
about the rest.

Failing that you could try asking Henry's cat. You must know Henry's
cat? He knows everything about nothing and not to much about that. So if
you know someone who know what he knows then you must know Henry's
cat....
</end totally irrelevant 80's cartoon reference>

I'll get my coat....

Col



--- End Message ---
--- Begin Message ---
On Tuesday 25 September 2007 03:27:25 Christian Hänsel wrote:
> "Colin Guthrie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
>
> > Auto-Deppe, C. Haensel wrote:
> >> Haha... nice one Col! Just started up my work computer, and the first
> >> thing I read is your post. Really a good start into the day :o) Thanks.
> >>
> >> Paul: Thanks for the flightgear link. As a FS2004 user I never even
> >> thought of flightgear, so thanks, I'll have a look at that :o)
> >
> > I think you missed the Reply All button that this list likes so much....
> >
> > PS I got nostalgic and had to look up Henry's Cat:
> > http://www.henryscat.com/ awesome :D
> >
> > Check out Henry's Cat TV and hit the Jingle episode if you want to hear
> > the bit I (mis)quoted originally! Oh to be a child again (and not just
> > settle for having the mental age of one) :p
> >
> > Col
>
> Heck, I am turning 30 at the end of next month :o( Quit talking about age
> *big grin*

This discussion is just plain weird. About this henrys cat thing... Thats 
OLD... really old, shit the scary part is that I remember it.
Cat probably knew nothin about php, since I never saw any reference to him in 
the archives. 
This shit is also likely to get some good google hits to,
search for "henrys cat php"... imagine that. WEIRD!

>
> >> ----- Original Message ----- From: "Colin Guthrie"
> >> <[EMAIL PROTECTED]> Newsgroups: php.general
> >> To: <[EMAIL PROTECTED]>
> >> Sent: Monday, September 24, 2007 6:12 PM
> >> Subject: Re: Data request
> >>
> >>> Stut wrote:
> >>>> Have you tried Google? It knows a lot about most things and a little
> >>>> about the rest.
> >>>
> >>> Failing that you could try asking Henry's cat. You must know Henry's
> >>> cat? He knows everything about nothing and not to much about that. So
> >>> if you know someone who know what he knows then you must know Henry's
> >>> cat....
> >>> </end totally irrelevant 80's cartoon reference>
> >>>
> >>> I'll get my coat....
> >>>
> >>> Col

--- End Message ---
--- Begin Message ---
On Tue, 2007-09-25 at 10:44 -0600, Børge Holen wrote:
> On Tuesday 25 September 2007 03:27:25 Christian Hänsel wrote:
> > "Colin Guthrie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > news:[EMAIL PROTECTED]
> >
> > > Auto-Deppe, C. Haensel wrote:
> > >> Haha... nice one Col! Just started up my work computer, and the first
> > >> thing I read is your post. Really a good start into the day :o) Thanks.
> > >>
> > >> Paul: Thanks for the flightgear link. As a FS2004 user I never even
> > >> thought of flightgear, so thanks, I'll have a look at that :o)
> > >
> > > I think you missed the Reply All button that this list likes so much....
> > >
> > > PS I got nostalgic and had to look up Henry's Cat:
> > > http://www.henryscat.com/ awesome :D
> > >
> > > Check out Henry's Cat TV and hit the Jingle episode if you want to hear
> > > the bit I (mis)quoted originally! Oh to be a child again (and not just
> > > settle for having the mental age of one) :p
> > >
> > > Col
> >
> > Heck, I am turning 30 at the end of next month :o( Quit talking about age
> > *big grin*
> 
> This discussion is just plain weird. About this henrys cat thing... Thats 
> OLD... really old, shit the scary part is that I remember it.
> Cat probably knew nothin about php, since I never saw any reference to him in 
> the archives. 
> This shit is also likely to get some good google hits to,
> search for "henrys cat php"... imagine that. WEIRD!

Oh sure, and now when I'm searching for "shit" I'll get all these
Henry's cat references *bleh*.

Yeah, yeah, I know, I'd never search for shit on the Internet anyways,
the prospect of the kind of results one would get is enough to make me
cringe.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
On Tue, 2007-09-25 at 09:17 -0400, Robert Cummings wrote:
> Oh sure, and now when I'm searching for "shit" I'll get all these
> Henry's cat references *bleh*.
> 
Well then why not tie in "coprophilia" as well?

ugh.

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

--- End Message ---
--- Begin Message ---
Dear All,

Mine is Linux FC6 and define the quota by using the build in as the following :

For sudoers :
apache    ALL= NOPASSWD:    /usr/bin/quota, /bin/grep

For /var/spool/mail
-rw------- 1 root root 7168 Sep 24 23:02 aquota.group
-rw------- 1 root root 8192 Sep 24 18:05 aquota.user

So, is there as sample for Quota Display ( FS Quota ) ?
I want to apply with a WebMail Client for a alarm message...

Many thanks !

Edward.

--- End Message ---
--- Begin Message ---
Hi!

I think that is not possible to read post data as a buffer with php like
it´s in perl. If this is true, how do you deal with large file uploads
to know the status of the operation at any time?

Thanks

Greetings from Spain
-- 
David Blanco

--- End Message ---
--- Begin Message ---
You may be looking for this :
http://martinjansen.com/2007/04/upload-progress/  

David Blanco-3 wrote:
> 
> Hi!
> 
> I think that is not possible to read post data as a buffer with php like
> it´s in perl. If this is true, how do you deal with large file uploads
> to know the status of the operation at any time?
> 
> Thanks
> 
> Greetings from Spain
> -- 
> David Blanco
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/read-post-data-as-a-buffer-tf4514831.html#a12879787
Sent from the PHP - General mailing list archive at Nabble.com.

--- End Message ---
--- Begin Message ---
At 7:47 PM +0100 9/24/07, Colin Guthrie wrote:
Robert Cummings wrote:
 On Mon, 2007-09-24 at 12:52 -0500, XIMvad wrote:
 hohoho .. maaanya :D

http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html


 DUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPE!!!

 Posted yesterday! :)

This is why everyone accuses us PHPites of rewriting everything :p

Col


And your point?  :-)

If I ever develop the attitude of "it's good enough", someone one shoot me.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Tue, 2007-09-25 at 08:29 -0400, tedd wrote:
> At 7:47 PM +0100 9/24/07, Colin Guthrie wrote:
> >Robert Cummings wrote:
> >>  On Mon, 2007-09-24 at 12:52 -0500, XIMvad wrote:
> >>>  hohoho .. maaanya :D
> >>> 
> >>>http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html
> >>
> >>
> >>  DUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPE!!!
> >>
> >>  Posted yesterday! :)
> >
> >This is why everyone accuses us PHPites of rewriting everything :p
> >
> >Col
> 
> 
> And your point?  :-)
> 
> If I ever develop the attitude of "it's good enough", someone one shoot me.

Why would we shoot you? You're good enough! >;)

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
My download script only gives me empty (0kb) xls files. They are being 
uploaded as blobs and seem ok. Can someone shed some light on why the 
downoad is not working.

Many Thanks,


R.


<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database

$id    = $_GET['id'];
$query = "SELECT id, file_name, size, type, content FROM results WHERE id = 
'$id'";

$result = mysql_query($query) or die(mysql_error());
list($id, $file_name, $type, $size, $content) = mysql_fetch_array($result);

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Length: ".filesize($size));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");


exit;
}

?> 

--- End Message ---
--- Begin Message ---
Hi Hulf,

Just looking at it, I'm not sure why it's not working. But here is the script I use for exporting database files to excel:

<?PHP


$sortOrder = $_SESSION['order'];
$search = $_SESSION['search'];
$select = "SELECT * FROM ".$table." WHERE FName like '%".$search."%' or LName like '%".$search."%' or Add1 like '%".$search."%' or Add2 like '%".$search."%' or City like '%".$search."%' or State like '%". $search."%' or Zip like '%".$search."%' or XCode like '%".$search."%' order by ".$sortOrder."";

$export = mysql_query($select);
$fields = mysql_num_fields($export);

for ($i = 0; $i < $fields; $i++) {
        $header .= mysql_field_name($export, $i) . "\t";
}

while($row = mysql_fetch_row($export)) {
        $line = '';
        foreach($row as $value) {
                if ((!isset($value)) or ($value == "")) {
                        $value = "\t";
                }
                else
                {
                        $value = str_replace('"', '""', $value);
                        $value = '"' . $value . '"' . "\t";
                }       
                $line .= $value;
        }
        $data .= trim($line). "\n";
}
$data = str_replace("\r", "", $data);

if ($data =="") {
        $data ="\n(0) Records Found!\n";
}
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=Export.xls");
header("Pragma: no-cache");
header("Expires: 0");


print "$header\n$data";


?>

On Sep 25, 2007, at 9:22 AM, Hulf wrote:

My download script only gives me empty (0kb) xls files. They are being
uploaded as blobs and seem ok. Can someone shed some light on why the
downoad is not working.

Many Thanks,


R.


<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database

$id    = $_GET['id'];
$query = "SELECT id, file_name, size, type, content FROM results WHERE id =
'$id'";

$result = mysql_query($query) or die(mysql_error());
list($id, $file_name, $type, $size, $content) = mysql_fetch_array ($result);

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Length: ".filesize($size));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");


Just out of my own curiosity, What does the Content-Length and Accept- Ranges do?


exit;
}

?>


Also, when I was trying to get mine working, I commented out all the header calls so it would print the results on the page so I didn't end up with 500 excel spreadsheets on my desktop.
--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hulf wrote:
My download script only gives me empty (0kb) xls files. They are being uploaded as blobs and seem ok. Can someone shed some light on why the downoad is not working.

header("Content-Length: ".filesize($size));

I'm thinking this should not be calling filesize.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Hulf wrote:
My download script only gives me empty (0kb) xls files. They are being uploaded as blobs and seem ok. Can someone shed some light on why the downoad is not working.

Many Thanks,


R.


<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database

$id    = $_GET['id'];
$query = "SELECT id, file_name, size, type, content FROM results WHERE id = '$id'";

$result = mysql_query($query) or die(mysql_error());
list($id, $file_name, $type, $size, $content) = mysql_fetch_array($result);

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Length: ".filesize($size));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");


exit;
}

?>

Were are you actually outputting the $content???

is $size the actual size of the data?  if so, you don't need to run 
filesize($size)


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--- End Message ---
--- Begin Message ---
Hulf wrote:
My download script only gives me empty (0kb) xls files. They are being uploaded as blobs and seem ok. Can someone shed some light on why the downoad is not working.

Many Thanks,


R.


<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database

$id    = $_GET['id'];
$query = "SELECT id, file_name, size, type, content FROM results WHERE id = '$id'";

$result = mysql_query($query) or die(mysql_error());
list($id, $file_name, $type, $size, $content) = mysql_fetch_array($result);

header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Length: ".filesize($size));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");


exit;
}

?>

You'll want to echo out $content before the exit call. And filesize($size) makes no sense here--this function expects the path to a *file* given to it.

brian

--- End Message ---
--- Begin Message ---
I'm trying to modify a string so that it can be used as a Distinguished
Name in an LDAP operation. Distinguished Names must have special
characters, such as (, ), / and \ escaped with a backslash. For
instance, 'Kevin (Kev) Zembower, III" becomes 'Kevin \(Kev\) Zembower\,
III'.

I tried to do this in this statement:
$entry['FirstName'] = preg_replace('/(\)|\(|\,|\/)/',`\\$1',
$entry['FirstName'];

But it gives me this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/var/www/centernet/htdocs/ldap_auth/conversion.php on line 89

Can anyone help me get this statement right? Also, this doesn't seem
very readable or easily maintained. I read about using an array() as the
pattern string, which might make the statement more readable. Can anyone
show me how this would be done, and suggest other ways to make this
statement more easily maintained?

Thanks for your advice and suggestions.

-Kevin

Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland  21202
410-659-6139 

--- End Message ---
--- Begin Message --- Suggest using the hex or oct codes for the special characters. It will save you much heart ache. Here is a great utility http://www.dextronet.com/charprobe.php

Zembower, Kevin wrote:
I'm trying to modify a string so that it can be used as a Distinguished
Name in an LDAP operation. Distinguished Names must have special
characters, such as (, ), / and \ escaped with a backslash. For
instance, 'Kevin (Kev) Zembower, III" becomes 'Kevin \(Kev\) Zembower\,
III'.

I tried to do this in this statement:
$entry['FirstName'] = preg_replace('/(\)|\(|\,|\/)/',`\\$1',
$entry['FirstName'];

But it gives me this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/var/www/centernet/htdocs/ldap_auth/conversion.php on line 89

Can anyone help me get this statement right? Also, this doesn't seem
very readable or easily maintained. I read about using an array() as the
pattern string, which might make the statement more readable. Can anyone
show me how this would be done, and suggest other ways to make this
statement more easily maintained?

Thanks for your advice and suggestions.

-Kevin

Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland  21202
410-659-6139

--- End Message ---
--- Begin Message ---
> 
> I'm trying to modify a string so that it can be used as a Distinguished
> Name in an LDAP operation. Distinguished Names must have special
> characters, such as (, ), / and \ escaped with a backslash. For
> instance, 'Kevin (Kev) Zembower, III" becomes 'Kevin \(Kev\) Zembower\,
> III'.
> 
> I tried to do this in this statement:
> $entry['FirstName'] = preg_replace('/(\)|\(|\,|\/)/',`\\$1',
> $entry['FirstName'];
> 
Two things I can see straight off that will give you a parse error:

1. You've used a back tick instead of a single quote before \\$1

2. There's no closing parenthesis to the preg_replace function.

Edward

--- End Message ---
--- Begin Message ---
Zembower, Kevin wrote:
I'm trying to modify a string so that it can be used as a Distinguished
Name in an LDAP operation. Distinguished Names must have special
characters, such as (, ), / and \ escaped with a backslash. For
instance, 'Kevin (Kev) Zembower, III" becomes 'Kevin \(Kev\) Zembower\,
III'.

I tried to do this in this statement:
$entry['FirstName'] = preg_replace('/(\)|\(|\,|\/)/',`\\$1',
$entry['FirstName'];

But it gives me this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/var/www/centernet/htdocs/ldap_auth/conversion.php on line 89

Can anyone help me get this statement right? Also, this doesn't seem
very readable or easily maintained. I read about using an array() as the
pattern string, which might make the statement more readable. Can anyone
show me how this would be done, and suggest other ways to make this
statement more easily maintained?



preg_replace('/([\(\),]+)/', '\\\$1', $str)

You don't need the pipes (OR) in the search pattern. By placing them in the square brackets they act as a set of characters to search for.

The comma also does not require escaping.

I suggest you create an escapeDN() or escapeLDAPStr() function so that you can alter the search pattern in one place if you need to.

Oh, and i left out the escaped forward slash you had in your search pattern. Are you really expecting someone to have a forward slash in their name? If so, change it to:

'/([\(\)\/,]+)/'

brian

--- End Message ---
--- Begin Message ---
Zembower, Kevin wrote:
I'm trying to modify a string so that it can be used as a Distinguished
Name in an LDAP operation. Distinguished Names must have special
characters, such as (, ), / and \ escaped with a backslash. For
instance, 'Kevin (Kev) Zembower, III" becomes 'Kevin \(Kev\) Zembower\,
III'.

I tried to do this in this statement:
$entry['FirstName'] = preg_replace('/(\)|\(|\,|\/)/',`\\$1',
$entry['FirstName'];

But it gives me this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/var/www/centernet/htdocs/ldap_auth/conversion.php on line 89

Can anyone help me get this statement right? Also, this doesn't seem
very readable or easily maintained. I read about using an array() as the
pattern string, which might make the statement more readable. Can anyone
show me how this would be done, and suggest other ways to make this
statement more easily maintained?

Thanks for your advice and suggestions.

-Kevin

Kevin Zembower
Internet Services Group manager
Center for Communication Programs
Bloomberg School of Public Health
Johns Hopkins University
111 Market Place, Suite 310
Baltimore, Maryland  21202
410-659-6139


For a simple string replacement, why not do something like this

<?php

$FirstName = 'Kevin (Kev) Zembower, III';

echo $FirstName;

$replace[')'] = '\)';
$replace['('] = '\(';
$replace['/'] = '\/';
$replace[','] = '\,';

$FirstName = str_replace(array_keys($replace), $replace, $FirstName);

echo $FirstName;

?>

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--- End Message ---
--- Begin Message ---
Hey...

I'm researching, trying to find a really good/stable bidding/auction system.
I've checked freshmeat/sourceforge, etc.... Anybody with experience with one
of these kinds of systems that you care to share.

Looking to potentially rip it apart for my needs.

Thanks

--- End Message ---
--- Begin Message ---
Kevin Murphy wrote:
> > The problem is IE7. All browsers work with this code as is but IE  says
> > "Internet Explorer cannot download test.pdf from XXX...."

The problem with IE was when you told it not to cache the document. If
you just want the browser to download the file rather than let the
Adobe plug-in handle it, as it looks like you intend with the
Content-disposition set to attachment, you have to send just the right
headers to make IE happy. (I think Brian's example should do it.)
Otherwise, IE knows it can handle the document internally with a
plug-in and will still try to open the file anyway. For some reason
when IE tries to handle files like PDF, it downloads the file, saves
it to cache, and then tells the Adobe plug-in to open the file from
the cache. Since you've told IE not to cache the file, IE honors that
request -- it builds the cache filename (and may even save the file
before promptly deleting it) and then sends that file name to the
Adobe plug-in which then tries to open a file that does not exist in
your computer's local cache.

On 9/24/07, brian <[EMAIL PROTECTED]> wrote:
> echo 'Your software provider sucks eggs. Get a better browser.';

LOL. I love that approach, too. Unfortunately, it's not very practical. :-\

--- End Message ---

Reply via email to