php-general Digest 8 Oct 2008 10:11:05 -0000 Issue 5724

Topics (messages 281544 through 281578):

Missing Env. Variables when called by AT Scheduler
        281544 by: JJB
        281546 by: Chris

PHP and getting part of URL
        281545 by: Jason ML
        281547 by: Chris
        281548 by: Micah Gersten
        281549 by: Jason ML
        281551 by: Daniel Brown
        281554 by: Jason ML
        281555 by: Micah Gersten
        281570 by: Per Jessen

Plotting Tool
        281550 by: Liz Kim
        281552 by: Thorsten Suckow-Homberg
        281553 by: Daniel Brown
        281566 by: paragasu
        281567 by: Warren Vail

Login
        281556 by: Terry J Daichendt
        281557 by: Micah Gersten
        281558 by: Kyle Terry
        281559 by: Nilesh Govindrajan
        281560 by: Nilesh Govindrajan

Re: Selecting all records between a date range
        281561 by: Chris

Manipulating strings
        281562 by: Ron Piggott
        281563 by: Micah Gersten
        281564 by: Ron Piggott
        281565 by: Micah Gersten
        281572 by: Nathan Rixham

Re: php framework vs just php?
        281568 by: paragasu
        281574 by: Luke
        281576 by: Aschwin Wesselius

UTF-8 errors in RSS feed
        281569 by: Ron Rademaker
        281571 by: Nathan Rixham
        281573 by: Ron Rademaker
        281575 by: Ron Rademaker
        281578 by: Nathan Rixham

Re: Prefered Method for User authetification on VHosts
        281577 by: Per Jessen

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 --- We regularly send out massive mail blasts to our customers. Recently several mail blasts failed to transmit. After a serious amount of research we found the snippet of code below to be the place where it was breaking down. The issue it seems is that the Environment Variables HOST and SERVER_NAME are sometimes not returning true when executed from the Linux AT scheduler. (using atq commands). doing a php -i from the command line returns the correct values, as does putting in a php info command at the top of the script and opening it from a browser.

Does anyone have any clues about why a script called from the AT scheduler would be unable to detect what server it is on and behave appropriately?

function send_mail($subject, $subject_name, $from, $email, $customer_name, $html_message, $text_message, $customer_id=0) { if($_SERVER['HOST'] == 'domain.com' || $_SERVER['SERVER_NAME']=='customer.domain.com') {
               global $mail;
               if(!is_object($mail)) {
                       $mail = create_mail();
               }
       } else {
// If on staging server don't send emails to any address outside company
               if(!stristr($email, '@domain.com')) return true;
               $mail = Mail::factory('mail');



Thanks,

Joel

--- End Message ---
--- Begin Message ---
JJB wrote:
We regularly send out massive mail blasts to our customers. Recently several mail blasts failed to transmit. After a serious amount of research we found the snippet of code below to be the place where it was breaking down. The issue it seems is that the Environment Variables HOST and SERVER_NAME are sometimes not returning true when executed from the Linux AT scheduler. (using atq commands). doing a php -i from the command line returns the correct values, as does putting in a php info command at the top of the script and opening it from a browser.

I doubt php -i does that at all.

$ php -i | grep 'SERVER_NAME'
$


$_SERVER['SERVER_NAME'] and $_SERVER['HOST'] are set by web servers, they are not available through php-cli.

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
Hi PHP'ers,

PHP 4.4.8 and 5.

say I have a url like:

http://www.mydomain.tld/jason/index.php

In that index.php I want to have a piece of code that runs that tells me the 'jason' part of the URL so that I can run some custom read only queries for 'jason'

How can I do this? I know how to do everything except what PHP commands to run to get the info.

Thanks!

-Jason


--- End Message ---
--- Begin Message ---
Jason ML wrote:
Hi PHP'ers,

PHP 4.4.8 and 5.

say I have a url like:

http://www.mydomain.tld/jason/index.php

In that index.php I want to have a piece of code that runs that tells me the 'jason' part of the URL so that I can run some custom read only queries for 'jason'

How can I do this? I know how to do everything except what PHP commands to run to get the info.

print_r($_SERVER);

to see what you have available.

Then use http://php.net/parse_url on the right variable.

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
dirname($_SERVER['REQUEST_URI']);

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Jason ML wrote:
> Hi PHP'ers,
>
> PHP 4.4.8 and 5.
>
> say I have a url like:
>
> http://www.mydomain.tld/jason/index.php
>
> In that index.php I want to have a piece of code that runs that tells
> me the 'jason' part of the URL so that I can run some custom read only
> queries for 'jason'
>
> How can I do this? I know how to do everything except what PHP
> commands to run to get the info.
>
> Thanks!
>
> -Jason
>
>

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

dirname($_SERVER['REQUEST_URI']);


I have tried that and I dont get the proper URI:

Example running print_r($_SERVER); I get: [REQUEST_URI] => /net1003/ people/jason/

But then doing:

        $jason = dirname($_SERVER['REQUEST_URI']);
                        
        echo "URL: ";
        echo $jason;

I get: URL: /net1003/people

Thoughts on what I am doing wrong.

Jason


--- End Message ---
--- Begin Message ---
On Tue, Oct 7, 2008 at 7:57 PM, Jason ML <[EMAIL PROTECTED]> wrote:
>
> But then doing:
>
>        $jason = dirname($_SERVER['REQUEST_URI']);
>
>        echo "URL: ";
>        echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.

    Yeah.  Not R'ing TFM.  dirname() gives you the name of the
directory ABOVE what you pass.

        http://php.net/dirname

-- 
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

--- End Message ---
--- Begin Message ---
Daniel,

I get: URL: /net1003/people

Thoughts on what I am doing wrong.

   Yeah.  Not R'ing TFM.  dirname() gives you the name of the
directory ABOVE what you pass.

       http://php.net/dirname

Thanks for the pointer. You are indeed correct.

-Jason


--- End Message ---
--- Begin Message ---
Your original post has this as the URL:
> http://www.mydomain.tld/jason/index.php 

That's why I gave you that command.

If you want jason out of what you posted,
Check out the following commands:
http://us.php.net/array_pop
http://us.php.net/explode


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Jason ML wrote:
> Hi Micah,
>
>> dirname($_SERVER['REQUEST_URI']);
>
>
> I have tried that and I dont get the proper URI:
>
> Example running     print_r($_SERVER); I get: [REQUEST_URI] =>
> /net1003/people/jason/
>
> But then doing:
>
>     $jason = dirname($_SERVER['REQUEST_URI']);
>            
>     echo "URL: ";
>     echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.
>
> Jason

--- End Message ---
--- Begin Message ---
Jason ML wrote:

> Hi PHP'ers,
> 
> PHP 4.4.8 and 5.
> 
> say I have a url like:
> 
> http://www.mydomain.tld/jason/index.php
> 
> In that index.php I want to have a piece of code that runs that tells
> me the 'jason' part of the URL so that I can run some custom read only
> queries for 'jason'
> 
> How can I do this? I know how to do everything except what PHP
> commands to run to get the info.


http://php.net/manual/en/function.parse-url.php


/Per Jessen, Zürich


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

Anyone have any suggestions on a plotting package for PHP?
Nothing too crazy and fancy - just easy to read plots/graphs.
We were using PHPlot on our old server but it's requiring too many
lib's/util's to install on a new server.

TIA.

--- End Message ---
--- Begin Message ---
Hey there,

> Anyone have any suggestions on a plotting package for PHP?
> Nothing too crazy and fancy - just easy to read plots/graphs.
> We were using PHPlot on our old server but it's requiring too many
> lib's/util's to install on a new server.

> 

JPGraph:
http://www.aditus.nu/jpgraph/


HTH

Thorsten


--- End Message ---
--- Begin Message ---
On Tue, Oct 7, 2008 at 8:04 PM, Liz Kim <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Anyone have any suggestions on a plotting package for PHP?
> Nothing too crazy and fancy - just easy to read plots/graphs.
> We were using PHPlot on our old server but it's requiring too many
> lib's/util's to install on a new server.

    I think Richard Heyes was working on some of these, actually.  Not
positive if it was plotting or just display, though.  If you check the
archives, you might find something.  I'm CC'ing him personally, too.

    Here's one link of his I have from memory:

        http://www.phpguru.org/RGraph_dev/examples/bar.html

-- 
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

--- End Message ---
--- Begin Message ---
i am not sure if this one can be counted as OT. but, i found a JQuery
extension you can use.
it is a javascript http://code.google.com/p/flot/
and here is the result example http://ajaxian.com/archives/plotting-in-jquery

quite fancy ;)

On 10/8/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 8:04 PM, Liz Kim <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> Anyone have any suggestions on a plotting package for PHP?
>> Nothing too crazy and fancy - just easy to read plots/graphs.
>> We were using PHPlot on our old server but it's requiring too many
>> lib's/util's to install on a new server.
>
>     I think Richard Heyes was working on some of these, actually.  Not
> positive if it was plotting or just display, though.  If you check the
> archives, you might find something.  I'm CC'ing him personally, too.
>
>     Here's one link of his I have from memory:
>
>         http://www.phpguru.org/RGraph_dev/examples/bar.html
>
> --
> </Daniel P. Brown>
> More full-root dedicated server packages:
> Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
> Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
> Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
> Dedicated servers, VPS, and hosting from $2.50/mo.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
You might check out JPGraph, I think it's available on source forge, very
little php code on your part can produce some pretty impressive results.

Warren Vail 

> -----Original Message-----
> From: paragasu [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 07, 2008 7:42 PM
> To: Daniel Brown
> Cc: Liz Kim; [EMAIL PROTECTED]; Richard Heyes
> Subject: Re: [PHP] Plotting Tool
> 
> i am not sure if this one can be counted as OT. but, i found 
> a JQuery extension you can use.
> it is a javascript http://code.google.com/p/flot/ and here is 
> the result example http://ajaxian.com/archives/plotting-in-jquery
> 
> quite fancy ;)
> 
> On 10/8/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> > On Tue, Oct 7, 2008 at 8:04 PM, Liz Kim <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> Anyone have any suggestions on a plotting package for PHP?
> >> Nothing too crazy and fancy - just easy to read plots/graphs.
> >> We were using PHPlot on our old server but it's requiring too many 
> >> lib's/util's to install on a new server.
> >
> >     I think Richard Heyes was working on some of these, 
> actually.  Not 
> > positive if it was plotting or just display, though.  If 
> you check the 
> > archives, you might find something.  I'm CC'ing him personally, too.
> >
> >     Here's one link of his I have from memory:
> >
> >         http://www.phpguru.org/RGraph_dev/examples/bar.html
> >
> > --
> > </Daniel P. Brown>
> > More full-root dedicated server packages:
> > Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
> > Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
> > Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
> > Dedicated servers, VPS, and hosting from $2.50/mo.
> >
> > --
> > PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: 
> > http://www.php.net/unsub.php
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message --- I want to open a page if a login is correct and another if not. What is the function to open a page in PHP? Can you show me a simple example of the syntax?
--- End Message ---
--- Begin Message ---
What do you mean by open?
You can redirect to a new page:
http://us.php.net/header
or
You can include a file:
http://us.php.net/include/

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Terry J Daichendt wrote:
> I want to open a page if a login is correct and another if not. What
> is the function to open a page in PHP? Can you show me a simple
> example of the syntax?
>

--- End Message ---
--- Begin Message --- You can just use a header redirect. For example: if you are at login.php and the user is authorized, you could use if($auth === true) { header("Location: authed_page.php");
} else { header("Location: denied.php"); }


On Oct 7, 2008, at 5:44 PM, "Terry J Daichendt" <[EMAIL PROTECTED]> wrote:

I want to open a page if a login is correct and another if not. What is the function to open a page in PHP? Can you show me a simple example of the syntax?

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


--- End Message ---
--- Begin Message ---
There is no such function! You have to write the code.


On Wed, Oct 8, 2008 at 6:14 AM, Terry J Daichendt
<[EMAIL PROTECTED]>wrote:

> I want to open a page if a login is correct and another if not. What is the
> function to open a page in PHP? Can you show me a simple example of the
> syntax?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Nilesh Govindrajan ([EMAIL PROTECTED])

iTech7 Site and Server Administrator

www.itech7.com

--- End Message ---
--- Begin Message ---
On Wednesday 08 October 2008 06:14:33 am Terry J Daichendt wrote:
> I want to open a page if a login is correct and another if not. What is the
> function to open a page in PHP? Can you show me a simple example of the
> syntax?

There is no such function. You have many options like redirecting a user-

header('Location: newfile.php');

showing another file-

include('newfile.php');

or using fopen to open a HTML file and print it (this one is very rarely 
used!).

--- End Message ---
--- Begin Message ---
Dan Joseph wrote:
On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:

       SQLTEST: SELECT * FROM `timeStore` WHERE        `timein` BETWEEN
1222315200 AND 1222920000
Could not perform query: Query was empty

<[EMAIL PROTECTED]>


Put a ' around your timestamp numbers.  I think that should fix that query.
Although I'll admitt, I have no way to test that on mysql, but that is how
MS SQL works...

Int's don't need quoting in mysql (or postgres, or oracle).. not sure why ms-sql would need that.

--
Postgresql & php tutorials
http://www.designmagick.com/


--- End Message ---
--- Begin Message ---
I have a series of questions.

How do I count the number of <br /> 's in a string?

How do I add text in the middle of a string, let's say after the 3rd
<br />

Ron


--- End Message ---
--- Begin Message ---
For the 1st question:
http://us.php.net/manual/en/function.substr-count.php

For the second question:
http://us.php.net/manual/en/function.strpos.php
http://us.php.net/manual/en/function.str-replace.php

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Ron Piggott wrote:
> I have a series of questions.
>
> How do I count the number of <br /> 's in a string?
>
> How do I add text in the middle of a string, let's say after the 3rd
> <br />
>
> Ron
>
>
>   

--- End Message ---
--- Begin Message ---
The first question was to find out how long the blog entry was (number
of paragraphs.)

I am wanting to put an ad in half way.  Consequently there are going to
be many <br /> 's before the one I am wanting to add text to.

How should I handle this?

Ron

On Tue, 2008-10-07 at 20:55 -0500, Micah Gersten wrote:
> For the second question:
> http://us.php.net/manual/en/function.strpos.php
> http://us.php.net/manual/en/function.str-replace.php
> 
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
> 
> 
> 
> Ron Piggott wrote:
> > I have a series of questions.
> >
> > How do I count the number of <br /> 's in a string?
> >
> > How do I add text in the middle of a string, let's say after the 3rd
> > <br />
> >
> > Ron
> >
> >
> >   


--- End Message ---
--- Begin Message ---
Then you'll need this as well:
http://us.php.net/manual/en/function.strlen.php

**strpos** ( $text , '<br />'
<http://us.php.net/manual/en/language.pseudo-types.php#language.types.mixed>,
strlen($text)/2 );

Will give you the position.

Use str_replace to insert your ad.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Ron Piggott wrote:
> The first question was to find out how long the blog entry was (number
> of paragraphs.)
>
> I am wanting to put an ad in half way.  Consequently there are going to
> be many <br /> 's before the one I am wanting to add text to.
>
> How should I handle this?
>
> Ron
>
> On Tue, 2008-10-07 at 20:55 -0500, Micah Gersten wrote:
>   
>> For the second question:
>> http://us.php.net/manual/en/function.strpos.php
>> http://us.php.net/manual/en/function.str-replace.php
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Ron Piggott wrote:
>>     
>>> I have a series of questions.
>>>
>>> How do I count the number of <br /> 's in a string?
>>>
>>> How do I add text in the middle of a string, let's say after the 3rd
>>> <br />
>>>
>>> Ron
>>>
>>>
>>>   
>>>       

--- End Message ---
--- Begin Message ---
Ron Piggott wrote:
I have a series of questions.

How do I count the number of <br /> 's in a string?

How do I add text in the middle of a string, let's say after the 3rd
<br />

Ron


simplest way from experience is to simply explode('<br />', $the_string)
you can then count the array -1 for number of br's; and add text to the front and end of each; or indeed add/remove paragraphs before imploding it back together.

If you want more power, most would say use regex or str_ functions, however I'd recommend getting used to the DOMDocument to traverse the html and make fine grained adjustments.


regards,

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--- End Message ---
--- Begin Message ---
> PHP framework vs just php ?
> http://paul-m-jones.com/?p=315

according to the benchmark.Just PHP win by more than 100%  to average framework.
even the fastest solar only manage to serve 154pages/sec compare to
just php 1320pages/sec

call me outdated. but i stay with just php!

On 10/8/08, Eric Butera <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 2:47 PM, Ashley Sheridan
> <[EMAIL PROTECTED]> wrote:
>> On Tue, 2008-10-07 at 11:20 -0300, uaca man wrote:
>>> Farid,
>>>
>>> I like to use PRADO(www.pradosoft.com), it is very easy to use for
>>> those who are coming from Microsoft .Net platform as it uses the same
>>> architecture. I did not like symfony, too much to read before the
>>> first example.
>>>
>>> Angelo
>>>
>>> 2008/10/6 farid lópez <[EMAIL PROTECTED]>:
>>> > what is your framework??? uacaman.
>>> >
>>> > i'm using symfony, but i'm reading the book. it's hard but there are so
>>> > many
>>> > things you can do easily with symfony!
>>> >
>>> > 2008/10/7 uaca man <[EMAIL PROTECTED]>
>>> >
>>> >> To be or not to be dump it your choice.
>>> >>
>>> >> My framework it not just awesome it is super awesome.
>>> >>
>>> >> Angelo
>>> >>
>>> >> 2008/10/6 Dan Joseph <[EMAIL PROTECTED]>:
>>> >> > On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim <[EMAIL PROTECTED]>
>>> >> > wrote:
>>> >> >
>>> >> >>
>>> >> >> But... Which framework is better? :P
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> > Oh my.. now we're gonna get all those guys popping back up telling
>>> >> > us how
>>> >> > dumb we are and how awesome their frameworks are again!
>>> >> >
>>> >> > --
>>> >> > -Dan Joseph
>>> >> >
>>> >> > www.canishosting.com - Plans start @ $1.99/month.
>>> >> >
>>> >> > "Build a man a fire, and he will be warm for the rest of the day.
>>> >> > Light a man on fire, and will be warm for the rest of his life."
>>> >> >
>>> >>
>>> >> --
>>> >> PHP General Mailing List (http://www.php.net/)
>>> >> To unsubscribe, visit: http://www.php.net/unsub.php
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Atte
>>> > Farid H. López Durán
>>> >
>>> > "La naturaleza del hombre es tal que puede conseguir la perfección
>>> > únicamente cuando
>>> > trabaja para el bienestar y la dignidad de sus conciudadanos".  Karl
>>> > Marx
>>> >
>>>
>> Don't frameworks introduce a lot more overhead to projects though?
>>
>>
>> Ashhttp://mail.google.com/mail/?shva=1#label/php-general/11975743c3279e0f
>> www.ashleysheridan.co.uk
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> Yep.  But there is always that balance between developer time versus
> computing time.  Usually we can start with the quick developer win and
> slowly attack slower areas.  Of course all of this is subjective and
> every case requires a unique look.
>
> Look at this:
>
> http://paul-m-jones.com/?p=315
>

--- End Message ---
--- Begin Message ---
I can't say I've ever used a framework.

I like to be in control of all of my code, plus it's much more satisfying
when you write everything yourself (I've found anyway)...

2008/10/8 paragasu <[EMAIL PROTECTED]>

> > PHP framework vs just php ?
> > http://paul-m-jones.com/?p=315
>
> according to the benchmark.Just PHP win by more than 100%  to average
> framework.
> even the fastest solar only manage to serve 154pages/sec compare to
> just php 1320pages/sec
>
> call me outdated. but i stay with just php!
>
> On 10/8/08, Eric Butera <[EMAIL PROTECTED]> wrote:
> > On Tue, Oct 7, 2008 at 2:47 PM, Ashley Sheridan
> > <[EMAIL PROTECTED]> wrote:
> >> On Tue, 2008-10-07 at 11:20 -0300, uaca man wrote:
> >>> Farid,
> >>>
> >>> I like to use PRADO(www.pradosoft.com), it is very easy to use for
> >>> those who are coming from Microsoft .Net platform as it uses the same
> >>> architecture. I did not like symfony, too much to read before the
> >>> first example.
> >>>
> >>> Angelo
> >>>
> >>> 2008/10/6 farid lópez <[EMAIL PROTECTED]>:
> >>> > what is your framework??? uacaman.
> >>> >
> >>> > i'm using symfony, but i'm reading the book. it's hard but there are
> so
> >>> > many
> >>> > things you can do easily with symfony!
> >>> >
> >>> > 2008/10/7 uaca man <[EMAIL PROTECTED]>
> >>> >
> >>> >> To be or not to be dump it your choice.
> >>> >>
> >>> >> My framework it not just awesome it is super awesome.
> >>> >>
> >>> >> Angelo
> >>> >>
> >>> >> 2008/10/6 Dan Joseph <[EMAIL PROTECTED]>:
> >>> >> > On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim <[EMAIL PROTECTED]>
> >>> >> > wrote:
> >>> >> >
> >>> >> >>
> >>> >> >> But... Which framework is better? :P
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> > Oh my.. now we're gonna get all those guys popping back up telling
> >>> >> > us how
> >>> >> > dumb we are and how awesome their frameworks are again!
> >>> >> >
> >>> >> > --
> >>> >> > -Dan Joseph
> >>> >> >
> >>> >> > www.canishosting.com - Plans start @ $1.99/month.
> >>> >> >
> >>> >> > "Build a man a fire, and he will be warm for the rest of the day.
> >>> >> > Light a man on fire, and will be warm for the rest of his life."
> >>> >> >
> >>> >>
> >>> >> --
> >>> >> PHP General Mailing List (http://www.php.net/)
> >>> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>> > --
> >>> > Atte
> >>> > Farid H. López Durán
> >>> >
> >>> > "La naturaleza del hombre es tal que puede conseguir la perfección
> >>> > únicamente cuando
> >>> > trabaja para el bienestar y la dignidad de sus conciudadanos".  Karl
> >>> > Marx
> >>> >
> >>>
> >> Don't frameworks introduce a lot more overhead to projects though?
> >>
> >>
> >> Ashhttp://
> mail.google.com/mail/?shva=1#label/php-general/11975743c3279e0f
> >> www.ashleysheridan.co.uk
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> > Yep.  But there is always that balance between developer time versus
> > computing time.  Usually we can start with the quick developer win and
> > slowly attack slower areas.  Of course all of this is subjective and
> > every case requires a unique look.
> >
> > Look at this:
> >
> > http://paul-m-jones.com/?p=315
> >
>
> --
>  PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Luke Slater

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

mI0ESOkTJwEEAL4irZ9kb6VclXiNe4U8gTFGnyaRp4/29d0zwM6eIlAAP30o/iLM
QBLHSKAco0tNV+g9BAlm3QWRONLGNsPKBY4wqm75Scwri+wdrz0obdjO/rnwg0td
hQKpnBXULWJi3HwSEMruQJ6nEZfYCMvBxWIRZetsbbiFs5pLgpT6QLVHABEBAAG0
Nkx1a2UgU2xhdGVyIChJIGxvdmUgY29ybnkpIDx0aW5tYWNoaW4zQGdvb2dsZW1h
aWwuY29tPoi2BBMBAgAgBQJI6RMnAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AA
CgkQe3smS6NtkbO24gP+Nt7aeYKK4R+HDQSXhr01rkcEpi6Jwdei3wmdX6knDyjE
mebI6ULyi7g+GCLjK6/9j04ri3j9kcGsKgI67kXt8iRaD0rPjLTdeJyInetNoOOJ
rEVp6HrthMW6g8j2PBDYnkPt0yR4K+Cn1krGbX7w41IWh3QO3FL+9OhLCaOd+u0=
=Zm5J
-----END PGP PUBLIC KEY BLOCK-----

--- End Message ---
--- Begin Message ---
Luke wrote:
I can't say I've ever used a framework.

I like to be in control of all of my code, plus it's much more satisfying
when you write everything yourself (I've found anyway)...
If I want to make use of existing code, I rather have a good understanding and a grasp of the philosophy behind it. It is all about decisions anyway, so I better know why than just think 'whatever' or 'I don't care'.

Therefore I just make use of libraries. Most of it is my own code, some are just variations on existing code and I tweaked it to my needs (or philosophy).

Frameworks are nice. But I've never seen any other construction work in other fields making use of frameworks without customizing it over and over again. When people build a house, they can use ready-built parts etc. But when that house is finished, it doesn't need any backwards compatability. Housing has a lot of 'standards' and regulations or best practises. But they never use another framework exactly the same way as they did before.

You can say 'Software ain't the same as housing'. Correct. But there are similarities however that makes you think about what is a good practise and what not.

If you have a function and it works, but it is old code, you can still reuse it, modify it and apply it. That doesn't make a need for putting the modified version back into your old project, just for the sake of 'maintainance'.

If I would be in the business of building houses, I would have to use pipes, cut them off, tweak them here and there to make them fit etc. That doesn't make a need for cut them all off already and tweak them for an older project, or next projects to come. No?

I rather have a good supply of small, workable, understandable pieces of code that could make up for a framework, but doesn't.

I don't want a house that is built on top of a factory framework with a lot of parts that makes it cloggy and won't be used at all.

That is just my idea of why I use a library, a toolkit, rather than frameworks that are oversized most of the time.
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other....'/

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

I'm trying to load an external rss feed into a DomDocument, the feed says it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20

Is there any way I can get DomDocument to skip that part of the feed. I'm not looking for the LIBXML_NOERROR option which results in not loading the feed at all. The feed has some incorrectly encoded pound sign in it that causes the problem. I'd much rather have the feed just without that pound sign (or maybe some weird character) than not having the feed at all.

Thanks,
Ron

--- End Message ---
--- Begin Message ---
Ron Rademaker wrote:
Hi,

I'm trying to load an external rss feed into a DomDocument, the feed says it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20

Is there any way I can get DomDocument to skip that part of the feed. I'm not looking for the LIBXML_NOERROR option which results in not loading the feed at all. The feed has some incorrectly encoded pound sign in it that causes the problem. I'd much rather have the feed just without that pound sign (or maybe some weird character) than not having the feed at all.

Thanks,
Ron

it's probably in latin-1; try running it through utf8_encode first :)

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

I'm trying to load an external rss feed into a DomDocument, the feed says it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20

Is there any way I can get DomDocument to skip that part of the feed. I'm not looking for the LIBXML_NOERROR option which results in not loading the feed at all. The feed has some incorrectly encoded pound sign in it that causes the problem. I'd much rather have the feed just without that pound sign (or maybe some weird character) than not having the feed at all.

Thanks,
Ron

--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
Ron Rademaker wrote:
Hi,

I'm trying to load an external rss feed into a DomDocument, the feed says it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20

Is there any way I can get DomDocument to skip that part of the feed. I'm not looking for the LIBXML_NOERROR option which results in not loading the feed at all. The feed has some incorrectly encoded pound sign in it that causes the problem. I'd much rather have the feed just without that pound sign (or maybe some weird character) than not having the feed at all.

Thanks,
Ron

it's probably in latin-1; try running it through utf8_encode first :)


That's not really an option when users can define their own RSS feeds, how can I tell which ones actually do as they say and which ones don't?
--- End Message ---
--- Begin Message ---
Ron Rademaker wrote:
Nathan Rixham wrote:
Ron Rademaker wrote:
Hi,

I'm trying to load an external rss feed into a DomDocument, the feed says it's uft-8 but DomDocument rightly disagrees. This causes a warning: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x36 0x35 0x20

Is there any way I can get DomDocument to skip that part of the feed. I'm not looking for the LIBXML_NOERROR option which results in not loading the feed at all. The feed has some incorrectly encoded pound sign in it that causes the problem. I'd much rather have the feed just without that pound sign (or maybe some weird character) than not having the feed at all.

Thanks,
Ron

it's probably in latin-1; try running it through utf8_encode first :)


That's not really an option when users can define their own RSS feeds, how can I tell which ones actually do as they say and which ones don't?

shameless plug; a few months ago I made a script rss_php which handles all of this for you; it's commercial however the classes which cover the encoding side are freely available here:
http://www.phpclasses.org/browse/package/4393.html

whether using them or simply checking the source, you'll find the solution :) [i hope! - works for me and 17k other people]

Regards!

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--- End Message ---
--- Begin Message ---
Jochem Maas wrote:

> seems like a lot of pain to go through, what with all that shell'ing
> out to grep data. I'd personally go for a simple DB table and
> use/store sha1() hashes.

My thoughts exactly. 


/Per Jessen, Zürich


--- End Message ---

Reply via email to