php-general Digest 8 Sep 2008 13:54:41 -0000 Issue 5670

Topics (messages 279626 through 279657):

Re: Sending out mass emails
        279626 by: Manuel Lemos
        279627 by: Manuel Lemos

translations for PHP app
        279628 by: Shawn McKenzie
        279634 by: Carlos Medina
        279640 by: Wolf
        279649 by: Per Jessen

Re: fsockopen in phpmailer and tls
        279629 by: Larry Brown
        279630 by: Manuel Lemos

Re: Recursive Iteration over a collection of objects
        279631 by: David Lidstone
        279633 by: Jochem Maas

Re: Path of the class file of an object
        279632 by: Jochem Maas
        279650 by: Ali Çevik

Interntet Explorer 8 beater 2
        279635 by: Richard Heyes
        279636 by: Colin Guthrie
        279639 by: Andrew Barnett
        279642 by: Richard Heyes
        279645 by: Andrew Barnett
        279653 by: Ross McKay
        279654 by: Craige Leeder
        279657 by: Richard Heyes

PHP RSS to email
        279637 by: Richard Heyes
        279638 by: Jason Pruim
        279641 by: Richard Heyes
        279643 by: Jason Pruim

Re: Evaluating script complexity
        279644 by: Jay Blanchard

xss filter
        279646 by: Emil Edeholt
        279647 by: Eric Butera
        279648 by: Bipin Upadhyay

Re: php image and javascript include
        279651 by: Jay Moore
        279652 by: Børge Holen

Re: render html
        279655 by: Craige Leeder

Re: Large/unreliable file uploading over HTTP
        279656 by: Craige Leeder

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

on 09/04/2008 10:47 AM Angelo Zanetti said the following:
Hi all,
We would like to send out mass emails for some of our clients, these are
HTML email and text alternative for the email clients that cant read those
HTML emails.

We have developed some scripts to send the emails using phpmailer.

Now we anticipate sending emails in batches but not sure how many at once.

This depends on what is your goal is sending it in batches. If it is to avoid server overload, you need to watch your server load and suspend delivery when it has too much load.

But if you have other concerns, you need to tell what are those concerns so we can advise.


Also what is the best way about going around being black listed due to spam
issues.

If you do not send messages to people that do not want them, that reduces the chances of being blacklisted.


I know that the headers need to be set to avoid being detected as spam.

That is a problem mostly with malformed messages. As long as the receipient address is in a visible header (To or Cc), at least Hotmail will not junk your messages for that.

Therefore you should be sending separate messages to each recipient so you can personalize at least the To header.

If your message is the same to all recipients, you should cache the MIME message data for the message body.

I do that using this MIME message class when sending newsletters that are the same for all recipients. Internally the class can cache the message body even when the headers vary for instance the To: and Return-Path: .

It saves a lot of server load that otherwise would be wasted rebuilding the same message body.

http://www.phpclasses.org/mimmessage


--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Hello,

The right class address below is http://www.phpclasses.org/mimemessage .

on 09/04/2008 10:47 AM Angelo Zanetti said the following:
Hi all,
We would like to send out mass emails for some of our clients, these are
HTML email and text alternative for the email clients that cant read those
HTML emails.

We have developed some scripts to send the emails using phpmailer.

Now we anticipate sending emails in batches but not sure how many at once.

This depends on what is your goal is sending it in batches. If it is to
avoid server overload, you need to watch your server load and suspend
delivery when it has too much load.

But if you have other concerns, you need to tell what are those concerns
so we can advise.


Also what is the best way about going around being black listed due to spam
issues.

If you do not send messages to people that do not want them, that
reduces the chances of being blacklisted.


I know that the headers need to be set to avoid being detected as spam.

That is a problem mostly with malformed messages. As long as the
receipient address is in a visible header (To or Cc), at least Hotmail
will not junk your messages for that.

Therefore you should be sending separate messages to each recipient so
you can personalize at least the To header.

If your message is the same to all recipients, you should cache the MIME
message data for the message body.

I do that using this MIME message class when sending newsletters that
are the same for all recipients. Internally the class can cache the
message body even when the headers vary for instance the To: and
Return-Path: .

It saves a lot of server load that otherwise would be wasted rebuilding
the same message body.

http://www.phpclasses.org/mimmessage


--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Hi All,

I'm looking for professional translations from English of the following:
- admin.php lang file just under 150 PHP defines
- user.php lang file just under 30 PHP defines
- a javascript file with about 25 single word defines
- about 19 PHP files with 2 defines in each

Most defines are 1 or 2 words with a few being sentences.

I need translations from English into the most common languages of my users: Spanish, French, Italian, Chinese, Indian, Russian. Also, anyone having expertise in other languages, I would love to have them, please contact me.

I also have a 30+ page user guide for using my software. Many pages contain large graphics, but the English text I woul love to have translated.

Of course I will pay.  PayPal only.

Thanks!
-Shawn

--- End Message ---
--- Begin Message ---
Shawn McKenzie schrieb:
Hi All,

I'm looking for professional translations from English of the following:
- admin.php lang file just under 150 PHP defines
- user.php lang file just under 30 PHP defines
- a javascript file with about 25 single word defines
- about 19 PHP files with 2 defines in each

Most defines are 1 or 2 words with a few being sentences.

I need translations from English into the most common languages of my users: Spanish, French, Italian, Chinese, Indian, Russian. Also, anyone having expertise in other languages, I would love to have them, please contact me.

I also have a 30+ page user guide for using my software. Many pages contain large graphics, but the English text I woul love to have translated.

Of course I will pay.  PayPal only.

Thanks!
-Shawn
Hi Shawn,
i can help you with the Translation in Spanish and German. I am native Speaker, with more than 5 Years experience on PHP Programming and Translations of Back- Frontend.

Regards

Carlos Medina

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
> Hi All,
> 
> I'm looking for professional translations from English of the following:
> - admin.php lang file just under 150 PHP defines
> - user.php lang file just under 30 PHP defines
> - a javascript file with about 25 single word defines
> - about 19 PHP files with 2 defines in each
> 
> Most defines are 1 or 2 words with a few being sentences.
> 
> I need translations from English into the most common languages of my
> users: Spanish, French, Italian, Chinese, Indian, Russian.  Also, anyone
> having expertise in other languages, I would love to have them, please
> contact me.
> 
> I also have a 30+ page user guide for using my software.  Many pages
> contain large graphics, but the English text I woul love to have
> translated.
> 
> Of course I will pay.  PayPal only.

Have you tried blowfish or the Google Translator?  The last time I tried
the google one, it did a whole page on the fly and seemed to be pretty
good at it.

Wolf


--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:

> I need translations from English into the most common languages of my
> users: Spanish, French, Italian, Chinese, Indian, Russian.  Also,
> anyone having expertise in other languages, I would love to have them,
> please contact me.

Maybe it's worth trying http://www.elance.com ?  (btw, "Indian" covers
several different languages). 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
On Sat, 2008-09-06 at 14:53 -0400, Robert Cummings wrote:
> On Sat, 2008-09-06 at 14:38 -0400, Larry Brown wrote:
> > On Sat, 2008-09-06 at 14:06 -0400, Robert Cummings wrote: 
> > > On Sat, 2008-09-06 at 14:02 -0400, Larry Brown wrote:
> > > >
> > > > OK.  So I broke down and re-created my mail server due to its age.  I
> > > > am
> > > > now running the latest sendmail and it is still failing.  The message
> > > > in
> > > > the sendmail log is 
> > > > 
> > > > "...<remoteMachineIP>] did not issue MAIL/EXPN/VRFY/ETRN during
> > > > connection to MTA"
> > > > 
> > > > A little research is leading me to believe the client (php client
> > > > script) opened the socket but didn't send anything.  Now the
> > > > certificate
> > > > that I'm using for the server is a self signed certificate.  Evolution
> > > > asked if I wanted to accept the certificate when I first connected and
> > > > I
> > > > did.  After which it worked fine.  Is there a setting I must enable to
> > > > accept unknown certificates when a site is first connected to?
> > > > 
> > > > Any other ideas?
> > > 
> > > Sounds like an email client issue and most likely may differ for each
> > > and every one of them.
> > > 
> > > Cheers,
> > > Rob.
> > > -- 
> > 
> > 
> > I am the email client.  In this case which is what I'm trying to figure
> > out.  The script fails with the original string I posted:
> > 
> > "PHP Warning:  fsockopen(): SSL operation failed with code 1. OpenSSL
> > Error messages:
> > error:1408F10B:SSL routines:func(143):reason(267)
> > in /opt/scriptsMain/include/class.smtp.php on line 122"
> > 
> >   I'm using the smtpmailer class and it is trying to execute fsockopen.
> > So to simplify troubleshooting I used the following code:
> > 
> > if(fsockopen("tls://<serverName>",25,$errno,$errstr, 30))
> > {
> >     echo "Made it!\n";
> > }
> > else
> > {
> >     echo "Nope!\n";
> >     echo $errno."\n";
> >     echo $errstr."\n";
> > }
> > 
> > I get the above warning from PHP and $errno has 0 as a value and there
> > is $errstr is empty.
> > 
> > PHP is v5.2.6 and phpinfo shows that ssl and tls support are both
> > compiled in.
> 
> Ah, I see, I misunderstood when you mentioned Evolution. Sorry, I can't
> really help you, you're in foreign territory to me :/
> 
> Cheers,
> Rob.

For posterity and to thank Robert...

I have determined that the mechanism in PHP does not allow you to
specify tls for a connection that initially starts off as a clear text
connection.  When you set up sendmail to use tls for smtp auth it allows
a connecting client to send connection details specifying tls at which
point it will start talking tls.  PHP expects the connection to be
dedicated tls.  So if you specify in sendmail to use a separate port for
tls and you point PHP to that port it works like a champ.

Thanks to Robert for at least giving it a shot.  Hopefully this will be
helpful to the next poor soul...

Larry



--- End Message ---
--- Begin Message ---
Hello,

on 09/05/2008 12:20 AM Larry Brown said the following:
I am having a ball of a time trying to figure this one out... If anyone
has dealt with this before I'd love to get some morsels of wisdom from
you...

I am trying to connect to a postfix server I have set up remotely using
smtp auth with tls.  The postfix appears to be configured correctly at
this point.  I can telnet to port 25 and it will list tls as an option
as the howto describes it should.  I try to connect from php and get:

PHP Warning:  fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages:
error:1408F10B:SSL routines:func(143):reason(267)
in /opt/scriptsMain/include/class.smtp.php on line 122

I suspect that you are using the wrong port to send messages via SSL . The fact that port 25 SMTP connections list TLS as available mode, that is for starting TLS after the connection was started.

I use this class to send messages via SMTP using SSL to Gmail, but the port is not 25. You may want to try it to see if it works for your server. Take a look at the test_smtp_message.php example script.

http://www.phpclasses.org/mimemessage

You also need this for SMTP deliveries:

http://www.phpclasses.org/smtpclass

and this to initiate authentication:

http://www.phpclasses.org/sasl



--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Thanks very much to both of you.

This does the trick! I had (stupidly) tried:

foreach ($c as new RecursiveIteratorIterator($item))

which with hindsight is completely illogical! I also wasn't aware of the constants. Is there a simple tutorial / docs you know of for SPL? I have tried numerous google searches but the tutorials I have found assume I already know what I am talking about (big mistake:-) ). Even the PHP docs are very sparse. A real shame, as the SPL seems fantastic and I would love to use it more widely.

One other thing... is there a mirror for this list? I'm sure SPL must have been covered many times before, but every time I try to search, the server times out.

Thanks once again,

David


Nathan Nobbe wrote:


On Sun, Sep 7, 2008 at 11:05 AM, Jochem Maas <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    David Lidstone schreef:

        Hi

        I am getting myself quite confused while trying to use SPL to
        recursively iterate through a collection of objects, and any
        help would be greatly appreciated!

        My collection of objects is contained in a class (which I
        frequently use to iterate through objects stored in an array
        in the class), and I think my hasChildren() and getChildren()
        methods are working ok, but I am unable to make it recursive.

        I am particularly confused by where I have to use
        RecursiveIteratorIterator (do I have to at all?),


    something like:

    $c = new Categories;
    $c->loadAll();

    foreach (new RecursiveIteratorIterator($c) as $item)
           var_dump($item);


make sure to pass the appropriate mode when instantiating RecursiveIteratorIterator; the default is LEAVES_ONLY, which i presume is not what people want in most cases. here is the list of modes from the spl docs,

/mode/          Operation mode (one of):

    * LEAVES_ONLY only show leaves
    * SELF_FIRST show parents prior to their childs
    * CHILD_FIRST show all children prior to their parent

so, i typically use SELF_FIRST, and then Jochem's example would become,

..
foreach(new RecursiveIteratorIterator($c, RecursiveIteratorIterator::SELF_FIRST) as $item)
..

-nathan

--- End Message ---
--- Begin Message ---
David Lidstone schreef:
Thanks very much to both of you.

This does the trick! I had (stupidly) tried:

foreach ($c as new RecursiveIteratorIterator($item))

which with hindsight is completely illogical! I also wasn't aware of the constants. Is there a simple tutorial / docs you know of for SPL?

not really, there are these 2:

http://www.php.net/~helly/
http://www.php.net/spl

and tutorials of (na)various quality ... and we have Nathan, who seems to
be well up to speed on SPL (IIRC he's tested and posted quite a bit about/with 
it)

I have tried numerous google searches but the tutorials I have found assume I already know what I am talking about (big mistake:-) ).

keep cross-referencing the info in different sources until something sticks. :-)

Even the PHP docs are very sparse. A real shame, as the SPL seems fantastic and I would love to use it more widely.

SPL has some very nice features, bare in mind that often the abstraction they
offer is a performance overhead ... but not always, for instance I found that
a 'new FilterIterator(new RecursiveDirectoryIterator())' was faster than using
glob() (well 2 calls to glob()) when the number of files exceeded around 300
(in the given directory structure).

One other thing... is there a mirror for this list? I'm sure SPL must have been covered many times before, but every time I try to search, the server times out.

plenty, where do you think the spammers grep your email addr from?
try http://marc.info/?l=php-general&r=1&w=2

...


/mode/      Operation mode (one of):

    * LEAVES_ONLY only show leaves
    * SELF_FIRST show parents prior to their childs
    * CHILD_FIRST show all children prior to their parent

so, i typically use SELF_FIRST, and then Jochem's example would become,

..
foreach(new RecursiveIteratorIterator($c, RecursiveIteratorIterator::SELF_FIRST) as $item)

good catch, wasn't aware of the mode argument, I've only ever played with
it in terms of directory iteration (where LEAVES_ONLY makes sense in the common
use case)

..

-nathan



--- End Message ---
--- Begin Message ---
don't top post.

Ali Çevik schreef:
Hi,

I guess the word "meaningless" depends on what you are trying to do.

So, I guess I have to describe what I'm trying to do. The problem is, I need
to pass a php object to javascript via json and then back to php  again
using json. However, while doing that, I lose the type of the object
(because json_encode method or json_decode works independent from the
object's class). Thus, I somehow need to typecast. I thought I might hold
class name as a property of the object so it would be passed inside json,
but type casting would work if and only if I have class file of the object
included.

pass the class name as a property of the json encoded object  and use an
autoloader (with properly defined include_path).

http://php.net/autoload
http://php.net/spl_autoload_register

if your developing a framework its hard to imagine your not using autoload in
some way already, but there you go.

In case I add a "getClassPath()" like variable to each php class, it would
be a great mess. Moreover, what I'm trying to do is  developing a framework.
Thus, I don't want to force my users to alter their classes and their
behaviours.

This was my solution to keep the type persistent.

However, I would also thankfully appreciate if you have an idea to do that
in a better way.

thanks,

Ali.

On Sun, Sep 7, 2008 at 5:35 AM, ANR Daemon <[EMAIL PROTECTED]> wrote:

Greetings, "Ali Çevik".
In reply to Your message dated Sunday, September 7, 2008, 1:51:33,

I need a procedure or an implementation that gives path of the class
file
of
an object which I pass as a parameter.

Example;

Assume I have a class file located at C:\htdocs\Foo.class.php

In code after I include Foo.class.php;

<?php
$foo = new Foo();
Echo some_procedure($foo);
?>

I'm looking an implementation for that "some_procedure", which would
make
this program to print C:\htdocs\Foo.class.php .
I have been googling around and also checked php.net but I wasn't
able
to
find anything about this subject.

It would be really helpful if someone knows that kind of procedure or
at
least has an implementation of it.

The only way I know to do this would be to add a method to your class
to
give it to you.

class Foo
{
   public function getClassFilename()
   {
       return __FILE__;
   }
}
    Hmm, that should do the trick. Thanks a lot!
    But still, I wish there were a way of doing that, without altering
the
class behaviour.
(top posting fixed)

Ok, if you prefer backward solution - hook your own error-handler and cause
an
error in class, then you'll have path to it's file in backtrace.
I mean, knowing the filename of this or that function absolutely
meaningless,
unless you're running into problem of some sort.


--
Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>


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





--- End Message ---
--- Begin Message ---
Correct me if I'm wrong but, unless I have a common folder for my class
files, such as "/classes/", an autoloader has nothing to do with solving my
problem. I get the impression that there might not be another way of solving
the problem too, sadly. I need to force my users to put all their class
files in a single directory. And it's rather messy..


On Mon, Sep 8, 2008 at 12:24 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:

> don't top post.
>
> Ali Çevik schreef:
>
>> Hi,
>>
>> I guess the word "meaningless" depends on what you are trying to do.
>>
>> So, I guess I have to describe what I'm trying to do. The problem is, I
>> need
>> to pass a php object to javascript via json and then back to php  again
>> using json. However, while doing that, I lose the type of the object
>> (because json_encode method or json_decode works independent from the
>> object's class). Thus, I somehow need to typecast. I thought I might hold
>> class name as a property of the object so it would be passed inside json,
>> but type casting would work if and only if I have class file of the object
>> included.
>>
>
> pass the class name as a property of the json encoded object  and use an
> autoloader (with properly defined include_path).
>
> http://php.net/autoload
> http://php.net/spl_autoload_register
>
> if your developing a framework its hard to imagine your not using autoload
> in
> some way already, but there you go.
>
>
>  In case I add a "getClassPath()" like variable to each php class, it would
>> be a great mess. Moreover, what I'm trying to do is  developing a
>> framework.
>> Thus, I don't want to force my users to alter their classes and their
>> behaviours.
>>
>> This was my solution to keep the type persistent.
>>
>> However, I would also thankfully appreciate if you have an idea to do that
>> in a better way.
>>
>> thanks,
>>
>> Ali.
>>
>> On Sun, Sep 7, 2008 at 5:35 AM, ANR Daemon <[EMAIL PROTECTED]> wrote:
>>
>>  Greetings, "Ali Çevik".
>>> In reply to Your message dated Sunday, September 7, 2008, 1:51:33,
>>>
>>>  I need a procedure or an implementation that gives path of the class
>>>>>>>
>>>>>> file
>>>
>>>> of
>>>>>>> an object which I pass as a parameter.
>>>>>>>
>>>>>>> Example;
>>>>>>>
>>>>>>> Assume I have a class file located at C:\htdocs\Foo.class.php
>>>>>>>
>>>>>>> In code after I include Foo.class.php;
>>>>>>>
>>>>>>> <?php
>>>>>>> $foo = new Foo();
>>>>>>> Echo some_procedure($foo);
>>>>>>> ?>
>>>>>>>
>>>>>>> I'm looking an implementation for that "some_procedure", which would
>>>>>>>
>>>>>> make
>>>
>>>> this program to print C:\htdocs\Foo.class.php .
>>>>>>> I have been googling around and also checked php.net but I wasn't
>>>>>>>
>>>>>> able
>>>
>>>> to
>>>>>>> find anything about this subject.
>>>>>>>
>>>>>>> It would be really helpful if someone knows that kind of procedure or
>>>>>>>
>>>>>> at
>>>
>>>> least has an implementation of it.
>>>>>>>
>>>>>>>  The only way I know to do this would be to add a method to your
>>>>>> class
>>>>>>
>>>>> to
>>>
>>>> give it to you.
>>>>>>
>>>>>> class Foo
>>>>>> {
>>>>>>   public function getClassFilename()
>>>>>>   {
>>>>>>       return __FILE__;
>>>>>>   }
>>>>>> }
>>>>>>
>>>>>    Hmm, that should do the trick. Thanks a lot!
>>>>    But still, I wish there were a way of doing that, without altering
>>>>
>>> the
>>>
>>>> class behaviour.
>>>>
>>> (top posting fixed)
>>>
>>> Ok, if you prefer backward solution - hook your own error-handler and
>>> cause
>>> an
>>> error in class, then you'll have path to it's file in backtrace.
>>> I mean, knowing the filename of this or that function absolutely
>>> meaningless,
>>> unless you're running into problem of some sort.
>>>
>>>
>>> --
>>> Sincerely Yours, ANR Daemon <[EMAIL PROTECTED]>
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>
>

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

Anyone using it?

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Anyone using it?

Do you mean Firefox, Chrome or Safari? All of these are Internet Explorer beaters....

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--- End Message ---
--- Begin Message ---
I think he is asking whether people are using Internet Explore 8 Beta 2

No I'm not using it, I still haven't ugraded to IE7 yet, and probably
won't while I use Firefox 3, and am quite happy with FF3.


Andrew

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

> I think he is asking whether people are using Internet Explore 8 Beta 2

I am. That would be an obscure sense of humour.

> No I'm not using it, I still haven't ugraded to IE7 yet, and probably
> won't while I use Firefox 3, and am quite happy with FF3.

I really don't want to install a beta (though I did install Chrome, so
maybe that should be "an MS beta") but I am interested in how it
performs.

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

--- End Message ---
--- Begin Message ---
Sorry, but sarcasm doesn't quite come across email very effectively.


2008/9/8 Richard Heyes <[EMAIL PROTECTED]>:
> Hi,
>
>> I think he is asking whether people are using Internet Explore 8 Beta 2
>
> I am. That would be an obscure sense of humour.
>
>> No I'm not using it, I still haven't ugraded to IE7 yet, and probably
>> won't while I use Firefox 3, and am quite happy with FF3.
>
> I really don't want to install a beta (though I did install Chrome, so
> maybe that should be "an MS beta") but I am interested in how it
> performs.
>
> --
> Richard Heyes
>
> HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
> http://www.phpguru.org/RGraph
>

--- End Message ---
--- Begin Message ---
On Mon, 8 Sep 2008 13:03:18 +0100, "Richard Heyes" wrote:

>I really don't want to install a beta (though I did install Chrome, so
>maybe that should be "an MS beta") but I am interested in how it
>performs.

That's what God invented the virtual machine for. Load up Windows XP in
KVM, QEMU, VirtualBox, VMware or whatever takes your fancy, then plaster
it with IE8b2 and see what breaks.

I have to admit it's been sitting in a folder here waiting for just that
to happen for ... when was it released? Crikey, work can really get in
the way sometimes, eh?  :)

(although I did find time to test Chrome in KVM - and I must say it is
fast, if not particularly useful yet)
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

--- End Message ---
--- Begin Message ---
No, I'm not. I didn't even know it was in Beta until this email.

I probably wont download it until final release. I'm not the biggest MS fan, and pretty much the only reason I use IE is for cross-browser testing.

- Craige.

Richard Heyes wrote:
Hi,

Anyone using it?


--- End Message ---
--- Begin Message ---
> God

Who?

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

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

Anyone know of a PHP based RSS to email gateway. What I'm looking to
do is have something running on my website that provides an interface
for specifying some feeds, and these are subsequently checked every
hour or so. If a new news item is found, it fires off an email to me.
Basically want this since I check my email often, but not so much my
RSS reader which is tucked away in IE7, which I don't use so much now
since I'm doing a lot of canvas stuff.

If no-one knows of one, presumably Magpie could be used to create one?

Thanks.

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

--- End Message ---
--- Begin Message ---

On Sep 8, 2008, at 6:50 AM, Richard Heyes wrote:

Hi,

Anyone know of a PHP based RSS to email gateway. What I'm looking to
do is have something running on my website that provides an interface
for specifying some feeds, and these are subsequently checked every
hour or so. If a new news item is found, it fires off an email to me.
Basically want this since I check my email often, but not so much my
RSS reader which is tucked away in IE7, which I don't use so much now
since I'm doing a lot of canvas stuff.

If no-one knows of one, presumably Magpie could be used to create one?


Correct me if I'm wrong, but couldn't you use grab and parse the rss feeds you want, store the titles in a database, with a column for identifying if the e-mail has been sent? So every hour it checks your feeds, grabs the new ones, checks to see if emailSent="1" if not pass it to send_notification($email, $feedname, $feedtitle).

Or am I missing something? :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





--- End Message ---
--- Begin Message ---
> Correct me if I'm wrong, but couldn't you use grab and parse the rss feeds
> you want, store the titles in a database, with a column for identifying if
> the e-mail has been sent? So every hour it checks your feeds, grabs the new
> ones, checks to see if emailSent="1" if not pass it to
> send_notification($email, $feedname, $feedtitle).

Of course, (if ever I've had a "doh" moment I think now would be it).
Though I'll probably use a tmp file.

-- 
Richard Heyes

HTML5 Graphing for IE7, FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

--- End Message ---
--- Begin Message ---

On Sep 8, 2008, at 7:59 AM, Richard Heyes wrote:

Correct me if I'm wrong, but couldn't you use grab and parse the rss feeds you want, store the titles in a database, with a column for identifying if the e-mail has been sent? So every hour it checks your feeds, grabs the new
ones, checks to see if emailSent="1" if not pass it to
send_notification($email, $feedname, $feedtitle).

Of course, (if ever I've had a "doh" moment I think now would be it).
Though I'll probably use a tmp file.

I've been working almost exclusively with databases lately so all my solutions are including databases :)



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





--- End Message ---
--- Begin Message ---
[snip]
...experience...
[/snip]

Sounds like it is time for you to learn some modeling.

"Why?", you ask.

It is very simple; once a project is broken down into its component
parts it will be much easier for you to provide a time estimate for your
customer. Additionally, high level overviews (such as simple flow
charts) will give the customer something to sign-off on as it allows
them to visualize the project and make the needed changes before any
coding occurs.

"What tools do I use?", your curiosity increases.

Start simple. Open Office and Microsoft Excel have basic flowchart
shapes in their drawing tools. If you need to do some OOP modeling there
are several UML packages out there. There are several articles online
concerning UML.

--- End Message ---
--- Begin Message ---
Hello,

Do you know of any good ways to filter out javascript from html code? I've seen this code http://kallahar.com/smallprojects/php_xss_filter_function.php but I found some old discussions about it saying that it wasn't really secure.

There most be some safe way to filter out xss without filtering out all html. Or...?

Kind Regards Emil


--- End Message ---
--- Begin Message ---
On Mon, Sep 8, 2008 at 8:16 AM, Emil Edeholt <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Do you know of any good ways to filter out javascript from html code? I've
> seen this code http://kallahar.com/smallprojects/php_xss_filter_function.php
> but I found some old discussions about it saying that it wasn't really
> secure.
>
> There most be some safe way to filter out xss without filtering out all
> html. Or...?
>
> Kind Regards Emil
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

http://htmlpurifier.org/

--- End Message ---
--- Begin Message ---
IMHO, the obvious choice (for PHP) should be HTML Purifier by Edward Yang.
Link: http://htmlpurifier.org/

--Bipin Upadhyay.

On Mon, Sep 8, 2008 at 5:46 PM, Emil Edeholt <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Do you know of any good ways to filter out javascript from html code? I've
> seen this code http://kallahar.com/smallprojects/php_xss_filter_function.php
> but I found some old discussions about it saying that it wasn't really
> secure.
>
> There most be some safe way to filter out xss without filtering out all
> html. Or...?
>
> Kind Regards Emil
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
I'd love to change the world,
but they won't gimme the source code.
http://projectbee.org/

--- End Message ---
--- Begin Message ---
Dreamweaver? Eclipse? Pah, it's all about using a text editor! Kate (on
KDE) is my preference ;)

Heathen!

Dreamweaver is awesome. Not for their WYSIWYG editor, but for their code-only view and its auto-complete.

Never have I typed so little to get so... little.

Jay

--- End Message ---
--- Begin Message ---
On Monday 08 September 2008 14:53:24 Jay Moore wrote:
> > Dreamweaver? Eclipse? Pah, it's all about using a text editor! Kate (on
> > KDE) is my preference ;)
>
> Heathen!
>
> Dreamweaver is awesome.  Not for their WYSIWYG editor, but for their
> code-only view and its auto-complete.
>
> Never have I typed so little to get so... little.

I thought so to, till I tried quanta+

>
> Jay



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

--- End Message ---
--- Begin Message ---
Can we see your parsing code, please?

BTW, are you parsing for <br> and <br />, because you have given both as an example here.

- Craige

VamVan wrote:
hello,

i have html tags in the bod of text like:

$body = "hello<br/><ul>ier</ul>hellohello";

print $body;

Some how it does not render html properly in a html page , what might be
going wrong?  <br> still get displayed as <br> instead of line breaks.

How can I render my HTML properly. Please note that it happens in  my cms.

Thanks



--- End Message ---
--- Begin Message --- The only concern I would have is that you are using a third party software/applet to do these uploads. I'm not a fan of MAKING users have a piece of software enabled to allow them basic web-standard functionality on a site.

It is however, an interesting concept. It would really come in handy for extremely large files.

- Craige

mike wrote:
Let's face it - HTTP is not very good for file uploads. It's stateless
nature, slow connections, inability to resume (technically), etc, etc.

What I've been thinking about is a way to skip all the normal
annoyances with file uploading - multipart form encodings, file upload
tools with specific needs, PUT vs POST, connection resets, ... the
list goes on and on.

Usenet and BitTorrent and other protocols have the right idea - split
up the workload into smaller sets of data. It's easier to operate on.
Usenet has NZB files. BitTorrent splits everything up into chunks. Not
only would it make working with the data more portable (no need to set
your PHP memory limit or POST limits to insane amounts to support
large files) but it could also support multiple segments of the file
being transferred at once...

Here's somewhat of a process braindump of what I'm thinking. It still
requires a 'smart' applet (Flash, Java, anything that can split a file
up and send data over HTTP/HTTPS) - no special socket needs, no PUT
support needed, don't even need to use multipart POST encoding (as far
as I know) - just send the data in chunks over the wire and have a PHP
script on the other side collect the data and reassemble it.

Does this sound insane? I think this is a pretty good approach - no
PUT needed, no large POST configuration required, anything could
upload to it as long as it sends the information properly (I'm
thinking HTTP POST for the header info, and the data could be sent as
another POST field maybe base64 encoded or something that will stay
safe during transit...)



- take input file, checksum it (md5 / sha1)
- calculate number of chunks to split it up based on $chunk configured
size (for example 128k chunks)
- split the file into chunks of $chunk size and create checksums for
all (could use sfv?)
- send request to the server - with the info - use JSON?
        action=begin
        filename=$filename
        filesize=$filesize
        checksum=$checksum
        segments=list of segments (unique segment id, checksum, bytes)
        - server sends back a "server ready" and unique $transaction_id
- start sending to the server, send header with transaction key and
unique chunk identifier in it
        action=process
        transaction=$transaction_id
        segment=$unique_segment_id
               data=base64_encode($segment_data)
        - when done, server sends back $transaction_id, $segment_id, $status
(okay, fail)
- client compares checksum for identifier, if okay, move to next chunk
        - if it does not match, retry uploading to server again
- when all chunks are done, send request with transaction key and
        action=finish
        transaction=$transaction_id
               - when the server receives this, it assembles the file
from the segments and does a final checksum, and reports the checksum
back to the client (warning: on a large file this could take a bit?)
and sends back $transaction_id, $checksum
- client does one last check against the file's original checksum, if
it matches report success, otherwise report failure (would need to
determine why though - if all segments match this should not be able
to happen...)

I'd appreciate everyone's thoughts. This would also allow for file
upload progress, more or less, as the server and client are constantly
communicating when chunks are done and in progress (but again, that
has to be done with an applet)

I can't think of any method to do it in-browser, but doing it this way
could open the gates for things like Google Gears to possibly work
too...



--- End Message ---

Reply via email to