OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 18 Dec 2007 21:11:37 -0000 Issue 5188

php-general-digest-helplists.php.net
Date: Tue Dec 18 2007 - 15:11:37 CST


php-general Digest 18 Dec 2007 21:11:37 -0000 Issue 5188

Topics (messages 266009 through 266047):

Re: export data to a ms excel file using php
        266009 by: Edward Kay
        266013 by: Jason Pruim
        266015 by: Jay Blanchard
        266042 by: Jim Lucas
        266043 by: Jim Lucas

Re: [PHP-DB] force to download file
        266010 by: Richard Heyes

Re: Writing text into images, and setting text size
        266011 by: Dave M G
        266034 by: Andrés Robinet

Tracking visitor times
        266012 by: Zoran Bogdanov
        266014 by: Andrew Ballard

Ham marked as Spam with BAYES_99 - PhpMailer to old?
        266016 by: Merlin Morgenstern
        266017 by: Daniel Brown
        266019 by: Stut
        266031 by: Merlin Morgenstern

Re: Undelivered Mail Returned to Sender
        266018 by: Daniel Brown

Re: Generating Random Numbers with Normal Distribution
        266020 by: Daniel Brown
        266024 by: Jay Blanchard
        266025 by: Zoltán Németh
        266029 by: Daniel Brown
        266047 by: Bruce Cowin

Just to confirm...
        266021 by: Richard Heyes
        266022 by: Daniel Brown
        266023 by: Richard Heyes
        266026 by: Stut
        266027 by: Zoltán Németh
        266028 by: Colin Guthrie
        266030 by: Daniel Brown
        266032 by: Daniel Brown
        266035 by: Zoltán Németh

Re: PHP translation needed
        266033 by: Daniel Brown

Select Box CSS
        266036 by: VamVan
        266040 by: Stut

control browser with <a href> tag
        266037 by: Hiep Nguyen
        266038 by: Jay Blanchard
        266039 by: Wolf
        266041 by: Warren Vail

Re: Select Box CSS OT
        266044 by: Børge Holen
        266045 by: Dave Goodchild
        266046 by: Børge Holen

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


> can you help me to export data to a ms excel file using php. i tried to
> export them to an html format and change the extension to .xls that's work
> but i have lost the formatting

Save the data from PHP in comma separated value (CSV) format.

Edward

attached mail follows:


On Dec 18, 2007, at 4:05 AM, abderrazzak nejeoui wrote:

> can you help me to export data to a ms excel file using php. i tried
> to
> export them to an html format and change the extension to .xls
> that's work
> but i have lost the formatting
>
> excel and the navigator doesn't interpret my code in the same why
> (celles
> are not in the same size)

Hi Abderrazzak,

This is a script that I use to export to excel, and it works quite
well after pulling the info from a Database.

If you find any issues with it, let me know so I can try and fix it!
But I haven't had any complaints about it yet.

<?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";

?>

--

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

attached mail follows:


[snip]
can you help me to export data to a ms excel file using php. i tried to
export them to an html format and change the extension to .xls that's
work
but i have lost the formatting

excel and the navigator doesn't interpret my code in the same why
(celles
are not in the same size)
[/snip]

Here is an old article that may help; http://evolt.org/node/26896

attached mail follows:


abderrazzak nejeoui wrote:
> can you help me to export data to a ms excel file using php. i tried to
> export them to an html format and change the extension to .xls that's work
> but i have lost the formatting
>
> excel and the navigator doesn't interpret my code in the same why (celles
> are not in the same size)
>

Ok, so with the examples of others here, here is the shortest example that I came up with that
should get you going.

<?php

header("Content-Type: application/vnd.ms-excel");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

$x = $y = range(0, 12);

echo '<table>';

echo '<tr><td> </td><td>' . join('</td><td>', $x) . '</td></tr>';

foreach ( $x AS $xx ) {
        echo "<tr><td>{$xx}</td>";
        foreach ( $y AS $yy ) {
                echo "<td>=sum(".(chr(ord('b')+$yy))."1*a".($xx+2).")</td>";
        }
        echo "</tr>";
}
echo '</table>';

?>

This will output a 14x14 table. It will calculate the totals for each cell in the actual
spreadsheet once excel loads it.

If you have any questions, ask away.

--
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

attached mail follows:


Jim Lucas wrote:
> abderrazzak nejeoui wrote:
>> can you help me to export data to a ms excel file using php. i tried to
>> export them to an html format and change the extension to .xls that's work
>> but i have lost the formatting
>>
>> excel and the navigator doesn't interpret my code in the same why (celles
>> are not in the same size)
>>
>
> Ok, so with the examples of others here, here is the shortest example that I came up with that
> should get you going.
>
> <?php
>
> header("Content-Type: application/vnd.ms-excel");
> header("Expires: 0");
> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
>
> $x = $y = range(0, 12);
>
> echo '<table>';
>
> echo '<tr><td> </td><td>' . join('</td><td>', $x) . '</td></tr>';
>
> foreach ( $x AS $xx ) {
> echo "<tr><td>{$xx}</td>";
> foreach ( $y AS $yy ) {
> echo "<td>=sum(".(chr(ord('b')+$yy))."1*a".($xx+2).")</td>";
> }
> echo "</tr>";
> }
> echo '</table>';
>
> ?>
>
> This will output a 14x14 table. It will calculate the totals for each cell in the actual
> spreadsheet once excel loads it.
>
> If you have any questions, ask away.
>

Note: as mentioned in one of the articles, you have to change the script name to .xls and have PHP
parse the .xls file, otherwise IE will not render correctly.

--
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

attached mail follows:


>> i have this on top of my php page:
>>
>> header("Content-Type: application/vnd.ms-excel");
>> header("Content-Disposition: inline; filename=excelfile.xls");
>>
>> but it is not prompt to save the file instead it opens right in IE.
>>
>> my question is how do i force the browser prompts to save the file?

<?php
     header('Content-Disposition: attachment; filename="'.$filename.'"');
?>

That should do the trick, but if not then try adding the Content-Type
header from below.

> <?
> function force_download($filename,$dir='./') {
> if ((isset($file))&&(file_exists($dir.$file))) {
> header("Content-type: application/force-download");
> header('Content-Disposition: inline; filename="'.$dir.$filename.'"');
> header("Content-Transfer-Encoding: Binary");
> header("Content-length: ".filesize($dir.$filename));
> header('Content-Type: application/octet-stream');
> header('Content-Disposition: attachment; filename="'.$filename.'"');
> readfile($dir.$filename);
> } else {
> echo "No file selected";
> }
> }
> ?>

FYI You have Content-Disposition twice; you only need the second.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

attached mail follows:


Rob,

Thank you for responding.

> Try the following:
> ... you load PrintImage.php into your browser and you'll get a nice gray rectangle with the word "Works!" in the center of it.
> If you don't get that... then you have a problem that is not related
to path or to PHP per-se...

Wow... thank you so much for providing that code to help me test my
environment.

I ran your script - with the corrections you provided - and did not get
the text that says "Works!".

I've checked with various fonts, and checked that they worked in
OpenOffice and other apps, so I don't think fonts are the problem.

As for GD support, phpinfo() it says:

GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
GetText Support enabled

Am I missing a necessary module?

> Hope this helps

It helps very much. Thank you.

--
Dave M G

attached mail follows:


Hi Dave,

Take a look
http://www.bestplace.biz/unittest/ttf/PrintImage.php

... and replace PrintImage.php with info.php in the URL to get the phpinfo.
See the CONFIGURE COMMAND line for the phpinfo (at the very beginning):
'--with-gd'
'--enable-gd-native-ttf'
'--with-ttf'
'--with-jpeg-dir=/usr/local/lib'
'--with-freetype-dir=/usr/local/lib'
'--with-png-dir=/usr/local/lib'

You might need to change /usr/local/lib according to your system configuration (this is a CentOS 4 box with DirectAdmin as the hosting control panel) and recompile PHP. However, before you run into an unnecessary mess...

1 - Add this line to the very beginning of the script and remove the code that outputs the image (all the "header" stuff and the "imagepng($im)" sentence):

        error_reporting(E_ALL);

I guess you have already don that but just in case... If there's an error you should see it with E_ALL

2 - If you find out that the problem is definitely PHP, you'd better off using the provided upgrade methods of your hosting control panel, or a standard or custom script provided at the hosting control panel's website. That will make your life easier (For DirectAdmin, there's custombuild, for others... I don't know)... otherwise, you'll have to edit the configure script, and run ./configure, make and make install as usual (and troubleshoot as usual).

Hope you get it working, :)

Rob

> -----Original Message-----
> From: Dave M G [mailto:martinautotelic.com]
> Sent: Tuesday, December 18, 2007 7:06 AM
> To: Andrés Robinet
> Cc: 'PHP List'
> Subject: Re: [PHP] Writing text into images, and setting text size
>
> Rob,
>
> Thank you for responding.
>
> > Try the following:
> > ... you load PrintImage.php into your browser and you'll get a nice
> gray rectangle with the word "Works!" in the center of it.
> > If you don't get that... then you have a problem that is not related
> to path or to PHP per-se...
>
> Wow... thank you so much for providing that code to help me test my
> environment.
>
> I ran your script - with the corrections you provided - and did not get
> the text that says "Works!".
>
> I've checked with various fonts, and checked that they worked in
> OpenOffice and other apps, so I don't think fonts are the problem.
>
> As for GD support, phpinfo() it says:
>
> GD Support enabled
> GD Version 2.0 or higher
> FreeType Support enabled
> FreeType Linkage with freetype
> FreeType Version 2.1.9
> T1Lib Support enabled
> GIF Read Support enabled
> GIF Create Support enabled
> JPG Support enabled
> PNG Support enabled
> WBMP Support enabled
> GetText Support enabled
>
> Am I missing a necessary module?
>
> > Hope this helps
>
> It helps very much. Thank you.
>
> --
> Dave M G
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Hi,

Is it possible to track how long has a single visitor been on my site?

example: I go to www.somesite.com at 5.am and I exit the page (close my
browser or just go to another site) at 6.am. How do i track that 1 hour
period using PHP?

Thanks alot!

attached mail follows:


On Dec 18, 2007 6:05 AM, Zoran Bogdanov <test1.test1hi.t-com.hr> wrote:
> Hi,
>
> Is it possible to track how long has a single visitor been on my site?
>
> example: I go to www.somesite.com at 5.am and I exit the page (close my
> browser or just go to another site) at 6.am. How do i track that 1 hour
> period using PHP?
>

If you just want to track a single visitor, it might be easiest just
to hire someone to go sit and watch them. :-) (Sorry -- I'm running
on little sleep and couldn't resist.)

Most often the stats packages that show how long a user visits a site
do so by examining the server's log files and looking for the last
page request by a particular user and the first request by the same
user and subtracting. You can do the same by checking whether a
session variable (or cookie) exists on every page and, if it does not,
set that session variable equal to the current time stamp. Then on
each successive request you could calculate how long it has been since
they first visited your site. If you need to report on the time later,
you'll need to store the times of each request to some persistent
location, which is what the log files are doing. If you have access,
you could read them; otherwise you can build your own log in a file or
a database.

Now, this won't tell you that after opened the last page I visit on
your site I spent another 20 minutes viewing your content. For that
matter, it doesn't guarantee that I actually read anything on your
site at all -- just that I requested some pages and that the time
between my first request and last request was one hour in your
example. If you really need to know when I "close my browser or just
go to another site" you'll need to add some JavaScript to send another
request when the browser leaves your site.

Andrew

attached mail follows:


Hi there,

I am running a small community page with PHP. Members can select
notification e-mails on comments etc.

Since today those e-mails - or basically all e-mails from the system -
get taged as spam with a score of 3.5 that totally results to BAYES_99.

How come? I am using PHP-Mailer 1.73. I am wondering if this will go
away if I upgrade to 2.0. However I would rather not like to do that
as a .0 release makes me a bit worried.

Does anybody have an idea on how to eleminate that BAYES_99 score? Those
mails are absolutly no spam. They contain a link to the commment page
but that should not be the problem. At least it was not a problem for
the last years.

Any ideas?

Thank you for any help,

Merlin

attached mail follows:


On Dec 18, 2007 9:41 AM, Merlin Morgenstern <ngroupsfastmail.fm> wrote:
[snip!]
> How come? I am using PHP-Mailer 1.73. I am wondering if this will go
> away if I upgrade to 2.0. However I would rather not like to do that
> as a .0 release makes me a bit worried.
[snip!]

    Merlin,

    Despite the name, PHP-Mailer has nothing to do with PHP aside from
the fact that this is the language in which it's written. Some things
that may help you out:

    1.) See if there's a forum or list for the PHP-Mailer script.
    2.) Search Google to see if there's anyone who suddenly came upon
a similar issue.
    3.) Contact your server admin to see if any changes were made to
the SMTP server.
    4.) See if your IP address(es) or domain(s) are listed in the RBL
or a similar list.
    5.) Send yourself a test email and view the actual source of that.
 Generally, the SPAM filter will give details in the headers.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


Merlin Morgenstern wrote:
> I am running a small community page with PHP. Members can select
> notification e-mails on comments etc.
>
> Since today those e-mails - or basically all e-mails from the system -
> get taged as spam with a score of 3.5 that totally results to BAYES_99.

This is most likely to be the content of the messages you're sending
rather than the structure of the emails as created by PHPMailer.

> How come? I am using PHP-Mailer 1.73. I am wondering if this will go
> away if I upgrade to 2.0. However I would rather not like to do that
> as a .0 release makes me a bit worried.

I doubt it but stranger things have happened. However this has nothing
to do with PHP itself, and would get a better response from a
PHPMailer-specific list (I assume there is one).

> Does anybody have an idea on how to eleminate that BAYES_99 score? Those
> mails are absolutly no spam. They contain a link to the commment page
> but that should not be the problem. At least it was not a problem for
> the last years.

AFAIK BAYES_99 means it thinks there is a 99% chance of it being spam,
that's very high for something you're saying is an operational email. Is
that link the only thing they contain? If so try adding more text.

It's also worth noting that this score comes from a system that's
capable of learning: http://en.wikipedia.org/wiki/Bayesian_spam_filtering

-Stut

--
http://stut.net/

attached mail follows:


Hello everybody,

thank you for the reply.

Stut schrieb:
> Merlin Morgenstern wrote:
>> I am running a small community page with PHP. Members can select
>> notification e-mails on comments etc.
>>
>> Since today those e-mails - or basically all e-mails from the system -
>> get taged as spam with a score of 3.5 that totally results to BAYES_99.
>
> This is most likely to be the content of the messages you're sending
> rather than the structure of the emails as created by PHPMailer.

I found that it almost any e-mail sent now from the site has that 3.5
spam score. Registration e-mails, Nitification e-mails etc.

>> How come? I am using PHP-Mailer 1.73. I am wondering if this will go
>> away if I upgrade to 2.0. However I would rather not like to do that
>> as a .0 release makes me a bit worried.
>
> I doubt it but stranger things have happened. However this has nothing
> to do with PHP itself, and would get a better response from a
> PHPMailer-specific list (I assume there is one).

You are right. I was just wondering if somebody else here has
experienced it today in their apps.

>> Does anybody have an idea on how to eleminate that BAYES_99 score?
>> Those mails are absolutly no spam. They contain a link to the commment
>> page but that should not be the problem. At least it was not a problem
>> for the last years.
>
> AFAIK BAYES_99 means it thinks there is a 99% chance of it being spam,
> that's very high for something you're saying is an operational email. Is
> that link the only thing they contain? If so try adding more text.
>

99%? How can they be so wrong? There must be a serious reason for that.

The message looks like this:

---
Hello xy,

You are receiving this email because you are watching
the topic, "Topicname " at Community

This topic has received a reply since your last visit.
You can use the following link to view the replies made.

http://link

If you no longer wish to watch this topic you can either
click the "Stop watching this topic link" found at the
bottom of the topic above (after you login!), or by
clicking the following link:

http://www.link
---

STrange, isn't it?

> It's also worth noting that this score comes from a system that's
> capable of learning: http://en.wikipedia.org/wiki/Bayesian_spam_filtering
>
> -Stut
>

`Thanks, will do.

Best regards,

Merlin

attached mail follows:


    Of course, this could be part of his problem, too....

---------- Forwarded message ----------
From: Mail Delivery System <MAILER-DAEMONmessagingengine.com>
Date: Dec 18, 2007 9:49 AM
Subject: Undelivered Mail Returned to Sender
To: parasanegmail.com

This is the mail system at host mx3.messagingengine.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<ngroupsfastmail.fm>: host lmtp2.messagingengine.com[10.202.2.42] said: 552
    5.2.2 Over quota (reported by store3m.internal in RCPT TO) (in reply to end
    of DATA command)

Final-Recipient: rfc822; ngroupsfastmail.fm
Original-Recipient: rfc822;ngroupsfastmail.fm
Action: failed
Status: 5.2.2
Remote-MTA: dns; lmtp2.messagingengine.com
Diagnostic-Code: smtp; 552 5.2.2 Over quota (reported by store3m.internal in
    RCPT TO)

---------- Forwarded message ----------
From: "Daniel Brown" <parasanegmail.com>
To: "Merlin Morgenstern" <ngroupsfastmail.fm>
Date: Tue, 18 Dec 2007 09:49:44 -0500
Subject: Re: [PHP] Ham marked as Spam with BAYES_99 - PhpMailer to old?
On Dec 18, 2007 9:41 AM, Merlin Morgenstern <ngroupsfastmail.fm> wrote:
[snip!]
> How come? I am using PHP-Mailer 1.73. I am wondering if this will go
> away if I upgrade to 2.0. However I would rather not like to do that
> as a .0 release makes me a bit worried.
[snip!]

    Merlin,

    Despite the name, PHP-Mailer has nothing to do with PHP aside from
the fact that this is the language in which it's written. Some things
that may help you out:

    1.) See if there's a forum or list for the PHP-Mailer script.
    2.) Search Google to see if there's anyone who suddenly came upon
a similar issue.
    3.) Contact your server admin to see if any changes were made to
the SMTP server.
    4.) See if your IP address(es) or domain(s) are listed in the RBL
or a similar list.
    5.) Send yourself a test email and view the actual source of that.
 Generally, the SPAM filter will give details in the headers.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


On Dec 18, 2007 1:50 AM, tedd <tedd.sperlinggmail.com> wrote:
> At 5:10 PM -0600 12/15/07, Richard Lynch wrote:
> >On Wed, December 12, 2007 11:07 pm, Robert Cummings wrote:
> >> Once again, we're not trying to prove order. Order obviously exists.
> >
> >I'm not sure I'd agree that order exists in the first place, much less
> >randomness or disorder. They could all be solely our human incorrect
> >interpretation.
>
> Well, that's close to my point -- order and disorder, random and
> predictable are concepts in our minds that do not exist in nature.
> Once a series of events, or an arrangement of objects satisfies our
> mind's definition of order or random, then we define it that way.

    This is the thread that doesn't end. Yes, it goes on and on, my
friend. Some people started typing here, not knowing what it was,
and they'll just keep replying-all forever just because this is the
thread that doesn't end....

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


[snip]
This is the thread that doesn't end. Yes, it goes on and on, my
friend. Some people started typing here, not knowing what it was,
and they'll just keep replying-all forever just because this is the
thread that doesn't end....
[/snip]

This thread lacks order.

attached mail follows:


2007. 12. 18, kedd keltezéssel 10.09-kor Daniel Brown ezt írta:
> On Dec 18, 2007 1:50 AM, tedd <tedd.sperlinggmail.com> wrote:
> > At 5:10 PM -0600 12/15/07, Richard Lynch wrote:
> > >On Wed, December 12, 2007 11:07 pm, Robert Cummings wrote:
> > >> Once again, we're not trying to prove order. Order obviously exists.
> > >
> > >I'm not sure I'd agree that order exists in the first place, much less
> > >randomness or disorder. They could all be solely our human incorrect
> > >interpretation.
> >
> > Well, that's close to my point -- order and disorder, random and
> > predictable are concepts in our minds that do not exist in nature.
> > Once a series of events, or an arrangement of objects satisfies our
> > mind's definition of order or random, then we define it that way.
>
> This is the thread that doesn't end. Yes, it goes on and on, my
> friend. Some people started typing here, not knowing what it was,
> and they'll just keep replying-all forever just because this is the
> thread that doesn't end....
>

that's because the thread could end only if we all knew the exact nature
of random and order ;)

greets
Zoltán Németh

>
>
> --
> Daniel P. Brown
> [Phone Numbers Go Here!]
> [They're Hidden From View!]
>
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
>

attached mail follows:


On Dec 18, 2007 10:39 AM, Zoltán Németh <znemethalterationx.hu> wrote:
[snip!]
> that's because the thread could end only if we all knew the exact nature
> of random and order ;)

    I'm Nostradamus-ly predicting that will happen around post 101.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


Ha ha, it does! Admittedly, I haven't read every line of every post in
this thread, but so far I haven't seen any mention of Nazis (until now).
 Godwin's Law breaking down????

Regards,

Bruce

>>> "Jay Blanchard" <jblanchardpocket.com> 19/12/2007 4:39:15 a.m.
>>>
[snip]
This is the thread that doesn't end. Yes, it goes on and on, my
friend. Some people started typing here, not knowing what it was,
and they'll just keep replying-all forever just because this is the
thread that doesn't end....
[/snip]

This thread lacks order.

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

attached mail follows:


Emails that bounce get sent back to the address in the Return-Path:
header. Correct?

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

attached mail follows:


On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
> Emails that bounce get sent back to the address in the Return-Path:
> header. Correct?

    Yes, sir.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


Daniel Brown wrote:
> On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
>> Emails that bounce get sent back to the address in the Return-Path:
>> header. Correct?
>
> Yes, sir.

Thanks. Is there usually a delay? Eg the mail server tries again after 4
hours.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **

attached mail follows:


Richard Heyes wrote:
> Daniel Brown wrote:
>> On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
>>> Emails that bounce get sent back to the address in the Return-Path:
>>> header. Correct?
>>
>> Yes, sir.
>
> Thanks. Is there usually a delay? Eg the mail server tries again after 4
> hours.

Depends on the nature of the failure. Some will cause a bounce to be
generated immediately. Others will cause delivery to be retried
periodically for a while and then generate a bounce. Some mail servers
generate delivery delay warnings (usually after 4 hours).

-Stut

--
http://stut.net/

attached mail follows:


2007. 12. 18, kedd keltezéssel 15.36-kor Richard Heyes ezt írta:
> Daniel Brown wrote:
> > On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
> >> Emails that bounce get sent back to the address in the Return-Path:
> >> header. Correct?
> >
> > Yes, sir.
>
> Thanks. Is there usually a delay? Eg the mail server tries again after 4
> hours.

AFAIK yes, it could be configured in the mailer daemon somewhere

greets
Zoltán Németh

>
> --
> Richard Heyes
> http://www.websupportsolutions.co.uk
>
> Knowledge Base and HelpDesk software
> that can cut the cost of online support
>
> ** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **
>

attached mail follows:


Daniel Brown wrote:
> On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
>> Emails that bounce get sent back to the address in the Return-Path:
>> header. Correct?
>
> Yes, sir.
>

Except when they go to the envelope sender or the Errors-To address..... ;)

"Errors-To: This is a non-standard RFC2822 message header added by
sendmail and other e-mail clients.

Ordinarily, errors are bounced to the envelope sender. The "Errors-To:"
header specifies the address, or addresses, to which sendmail should
send additional notification of delivery errors. This header is intended
for use by mailing lists, in order to prevent errors in a list from
being resent to the list as a whole. "

Col.

attached mail follows:


On Dec 18, 2007 10:40 AM, Stut <stuttlegmail.com> wrote:
> Richard Heyes wrote:
> > Daniel Brown wrote:
> >> On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
> >>> Emails that bounce get sent back to the address in the Return-Path:
> >>> header. Correct?
> >>
> >> Yes, sir.
> >
> > Thanks. Is there usually a delay? Eg the mail server tries again after 4
> > hours.
>
> Depends on the nature of the failure. Some will cause a bounce to be
> generated immediately. Others will cause delivery to be retried
> periodically for a while and then generate a bounce. Some mail servers
> generate delivery delay warnings (usually after 4 hours).

    It should also be mentioned that it's a user-configurable
parameter, at the admin's discretion. You could have a bounce retry
in as little as a minute, with (as far as I know) no maximum delay.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


On Dec 18, 2007 10:39 AM, Colin Guthrie <gmanecolin.guthr.ie> wrote:
> Daniel Brown wrote:
> > On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
> >> Emails that bounce get sent back to the address in the Return-Path:
> >> header. Correct?
> >
> > Yes, sir.
> >
>
> Except when they go to the envelope sender or the Errors-To address..... ;)
>
> "Errors-To: This is a non-standard RFC2822 message header added by
> sendmail and other e-mail clients.
>
> Ordinarily, errors are bounced to the envelope sender. The "Errors-To:"
> header specifies the address, or addresses, to which sendmail should
> send additional notification of delivery errors. This header is intended
> for use by mailing lists, in order to prevent errors in a list from
> being resent to the list as a whole. "
>
> Col.

    There's also the non-standard "bounce-handler-*" header, but it's
extremely limited use made me feel it wasn't worth mentioning. Your
point, however, Colin, was worth mentioning. ;-P

    That aside, coincidentally, I'm suddenly receiving a lot of
bounces from the list this morning. Even on messages that were
properly delivered, and to which replies were issued. Anyone else
getting these?

    Example:

Hi. This is the qmail-send program at lists.php.net.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<php-generallists.php.net>:
This message is looping: it already has my Delivered-To line. (#5.4.6)

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


2007. 12. 18, kedd keltezéssel 10.55-kor Daniel Brown ezt írta:
> On Dec 18, 2007 10:39 AM, Colin Guthrie <gmanecolin.guthr.ie> wrote:
> > Daniel Brown wrote:
> > > On Dec 18, 2007 10:17 AM, Richard Heyes <richardhphpguru.org> wrote:
> > >> Emails that bounce get sent back to the address in the Return-Path:
> > >> header. Correct?
> > >
> > > Yes, sir.
> > >
> >
> > Except when they go to the envelope sender or the Errors-To address..... ;)
> >
> > "Errors-To: This is a non-standard RFC2822 message header added by
> > sendmail and other e-mail clients.
> >
> > Ordinarily, errors are bounced to the envelope sender. The "Errors-To:"
> > header specifies the address, or addresses, to which sendmail should
> > send additional notification of delivery errors. This header is intended
> > for use by mailing lists, in order to prevent errors in a list from
> > being resent to the list as a whole. "
> >
> > Col.
>
> There's also the non-standard "bounce-handler-*" header, but it's
> extremely limited use made me feel it wasn't worth mentioning. Your
> point, however, Colin, was worth mentioning. ;-P
>
> That aside, coincidentally, I'm suddenly receiving a lot of
> bounces from the list this morning. Even on messages that were
> properly delivered, and to which replies were issued. Anyone else
> getting these?
>
> Example:
>
> Hi. This is the qmail-send program at lists.php.net.
> I'm afraid I wasn't able to deliver your message to the following addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> <php-generallists.php.net>:
> This message is looping: it already has my Delivered-To line. (#5.4.6)

yes, got one just now

greets
Zoltán Németh

>
> --
> Daniel P. Brown
> [Phone Numbers Go Here!]
> [They're Hidden From View!]
>
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
>

attached mail follows:


On Dec 17, 2007 11:22 PM, Casey <heavyccaseygmail.com> wrote:
>
> On Dec 17, 2007 7:06 PM, Grace Shibley <shibleyggmail.com> wrote:
> > Hi Everyone,
> >
> > We have an encryption function that was written in another language that we
> > needed translated to PHP.
> >
> > Here's the function:
> >
> > function rc4 pText, pKey
> > -- initialize
> > repeat with i = 0 to 255
> > put i into S1[i]
> > end repeat
> >
> > put 0 into i
> > repeat with n = 0 to 255
> > add 1 to i
> > if i > length(pkey) then put 1 into i
> > put chartonum(char i of pKey) into S2[n]
> > end repeat
> >
> > put 0 into j
> > repeat with i = 0 to 255
> > put (j + S1[i] + S2[i]) mod 256 into j
> > put S1[i] into temp
> > put S1[j] into S1[i]
> > put temp into S1[j]
> > end repeat
> >
> > -- encrypt/decrypt
> > put 0 into i ; put 0 into j
> > repeat for each char c in pText
> > put chartonum(c) into tChar
> >
> > put (i + 1) mod 256 into i
> > put (j + S1[i]) mod 256 into j
> > put S1[i] into temp
> > put S1[j] into S1[i]
> > put temp into S1[j]
> > put (S1[i] + S1[j]) mod 256 into t
> > put S1[t] into K
> >
> > put numtochar(tChar bitXor K) after tOutput
> > end repeat
> >
> > return tOutput
> > end rc4
> >
> > Can anyone help us with this? We don't mind paying via PayPal :)
> >
> > Thanks!
> > grace
> >
>
> function rc4($pText, $pKey) {
> // initialize
> $S1 = range(0, 255);
> $S2 = array();
>
> $i = 0;
> for ($n=0; $n<=255; $n++) {
> $i++;
> if ($i > strlen($pkey))
> $i = 1;
> $S2[] = ord($pKey[$i]);
> }
>
> $j = 0;
> for ($i=0; $i<=255; $i++) {
> $j = ($j + $S1[$i] + $S2[$i]) % 256;
> $temp = $S1[$i];
> $S1[$i] = $S1[$j];
> $S1[$j] = $temp;
> }
>
> // encrypt/decrypt
> $i = $j = 0;
> $tOutput = '';
>
> foreach (str_split($pText) as $c) {
> $tChar = ord($c);
>
> $i = ($i+1) % 256;
> $j = ($j+$S1[$i]) % 256;
> $temp = $S1[$i];
> $S1[$i] = $S1[$j];
> $S1[$j] = $temp;
> $t = ($S1[$i] + $S1[$j]) % 256;
> $K = $S1[$t];
>
> $tOutput .= chr($tChar ^ $K);
> }
>
> return $tOutput;
> }
>
> I don't know what language this is. I'm curious -- what is it? It
> might not work; it's untested except for syntax errors.

    That's written in Revolution. I just glanced at your translation,
Case, but it looks good with a (literally) two-second once-over.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

attached mail follows:


Hi All,

Please apologize for sending this question to PHP forums.

But I would appreciate it very much if some could please help me styling
<select mutiple> in HTMl with CSS?

I have .selectmulti { border: 1px solid #c9c9c9 } this code but it only
works in firefox How can I make this work in IE?

And also I want to change the selected color.

Thanks,

Vamsee

attached mail follows:


VamVan wrote:
> Please apologize for sending this question to PHP forums.

If you know this already why ask the question here? Also, this is not a
forum.

> But I would appreciate it very much if some could please help me styling
> <select mutiple> in HTMl with CSS?
>
> I have .selectmulti { border: 1px solid #c9c9c9 } this code but it only
> works in firefox How can I make this work in IE?
>
> And also I want to change the selected color.

AFAIK this can't be done without some very nasty code due to the way IE
renders select elements. Google has the answer if you really want it.

-Stut

--
http://stut.net/

attached mail follows:


hi friends,

i have two pages: list.php and update.php

list.php will have a hyper link that when click on, it will open a new window for user to update info. once user clicks update button on update.php page, i want to close update.php and return to list.php. however if user doesn't click update button, i don't want user to go back to list.php. in other word, freeze up list.php until user closes or clicks update button on update.php.

is this possible to do with php?

thanks

attached mail follows:


[snip]
i have two pages: list.php and update.php

list.php will have a hyper link that when click on, it will open a new
window for user to update info. once user clicks update button on
update.php page, i want to close update.php and return to list.php.
however if user doesn't click update button, i don't want user to go
back to list.php. in other word, freeze up list.php until user closes
or clicks update button on update.php.

is this possible to do with php?
[/snip]

Not with PHP. Javascript may be your answer

attached mail follows:


From a UI standpoint, this would be a reason why I would visit your site
once then never again. If you don't want them to touch a page, make the
current browser window change.

And what you are looking to do uses javascript

Wolf

Hiep Nguyen wrote:
> hi friends,
>
> i have two pages: list.php and update.php
>
> list.php will have a hyper link that when click on, it will open a new window for user to update info. once user clicks update button on update.php page, i want to close update.php and return to list.php. however if user doesn't click update button, i don't want user to go back to list.php. in other word, freeze up list.php until user closes or clicks update button on update.php.
>
> is this possible to do with php?
>
> thanks

attached mail follows:


> i have two pages: list.php and update.php
>
> list.php will have a hyper link that when click on, it will open a new
> window for user to update info. once user clicks update button on
> update.php page, i want to close update.php and return to list.php.
> however if user doesn't click update button, i don't want user to go back
> to list.php. in other word, freeze up list.php until user closes or
> clicks update button on update.php.
>
> is this possible to do with php?

Yes and no, don't think you intend to, but you may be mixing technologies.
You refer to hyperlinks, etc, which is web technologies and windows, which
is not unless you use javascript or ajax. With PHP you can cause your
browser to open a new browser by adding target="_blank" to the hyperlink,
but you cannot easily disable functionality of the old browser (It's still
open, just usually covered up by the new browser), and if the user clicks
your hyperlink again a 3rd browser will be opened. You could name your
target (target=mypage) which means if the user clicks it a new browser will
be opened, and if the user clicks the same link again, a 3rd window will not
be opened, but the page in the "mypage" target will be refreshed.

HTH,

Warren Vail

attached mail follows:


On Tuesday 18 December 2007 20:03:53 Stut wrote:
> VamVan wrote:
> > Please apologize for sending this question to PHP forums.
>
> If you know this already why ask the question here? Also, this is not a
> forum.
>
> > But I would appreciate it very much if some could please help me styling
> > <select mutiple> in HTMl with CSS?
> >
> > I have .selectmulti { border: 1px solid #c9c9c9 } this code but it only
> > works in firefox How can I make this work in IE?
> >
> > And also I want to change the selected color.
>
> AFAIK this can't be done without some very nasty code due to the way IE
> renders select elements. Google has the answer if you really want it.

Trinity renders shit, but for gods sake I would prefer if gecko would render
atleast acid2 and keep up with the demands of the stylists, before they call
themselves better than others. But then again, neither webkit or khtml is as
versatile as the other two.
Anyone with thoughts on opera...

>
> -Stut
>
> --
> http://stut.net/

--
---
Børge Holen
http://www.arivene.net

attached mail follows:


Why not try a css list? css-discuss for example?

On Dec 18, 2007 8:06 PM, Børge Holen <borgearivene.net> wrote:

> On Tuesday 18 December 2007 20:03:53 Stut wrote:
> > VamVan wrote:
> > > Please apologize for sending this question to PHP forums.
> >
> > If you know this already why ask the question here? Also, this is not a
> > forum.
> >
> > > But I would appreciate it very much if some could please help me
> styling
> > > <select mutiple> in HTMl with CSS?
> > >
> > > I have .selectmulti { border: 1px solid #c9c9c9 } this code but it
> only
> > > works in firefox How can I make this work in IE?
> > >
> > > And also I want to change the selected color.
> >
> > AFAIK this can't be done without some very nasty code due to the way IE
> > renders select elements. Google has the answer if you really want it.
>
> Trinity renders shit, but for gods sake I would prefer if gecko would
> render
> atleast acid2 and keep up with the demands of the stylists, before they
> call
> themselves better than others. But then again, neither webkit or khtml is
> as
> versatile as the other two.
> Anyone with thoughts on opera...
>
> >
> > -Stut
> >
> > --
> > http://stut.net/
>
>
>
> --
> ---
> Børge Holen
> http://www.arivene.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Tuesday 18 December 2007 21:16:46 you wrote:
> Why not try a css list? css-discuss for example?

Yes why not?

>
> On Dec 18, 2007 8:06 PM, Børge Holen <borgearivene.net> wrote:
> > On Tuesday 18 December 2007 20:03:53 Stut wrote:
> > > VamVan wrote:
> > > > Please apologize for sending this question to PHP forums.
> > >
> > > If you know this already why ask the question here? Also, this is not a
> > > forum.
> > >
> > > > But I would appreciate it very much if some could please help me
> >
> > styling
> >
> > > > <select mutiple> in HTMl with CSS?
> > > >
> > > > I have .selectmulti { border: 1px solid #c9c9c9 } this code but it
> >
> > only
> >
> > > > works in firefox How can I make this work in IE?
> > > >
> > > > And also I want to change the selected color.
> > >
> > > AFAIK this can't be done without some very nasty code due to the way IE
> > > renders select elements. Google has the answer if you really want it.
> >
> > Trinity renders shit, but for gods sake I would prefer if gecko would
> > render
> > atleast acid2 and keep up with the demands of the stylists, before they
> > call
> > themselves better than others. But then again, neither webkit or khtml is
> > as
> > versatile as the other two.
> > Anyone with thoughts on opera...
> >
> > > -Stut
> > >
> > > --
> > > http://stut.net/
> >
> > --
> > ---
> > Børge Holen
> > http://www.arivene.net
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

--
---
Børge Holen
http://www.arivene.net