Re: [PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread mike
I actually use $_SERVER['HTTP_CONTENT_RANGE'] in my setup (nginx +
php-fpm) - I don't think I get an 'HTTP_RANGE' ...



On Sat, Jan 3, 2009 at 9:52 PM, Lars Torben Wilson  wrote:
> 2009/1/3 Ashley Sheridan :
>> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>>>  wrote:
>>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>>> >> > I don't think this is actually possible. I've never seen it happen
>>> >> > before. It would need some sort of dedicated client-side software to
>>> >> > recognise exactly how much has been downloaded and then request the 
>>> >> > rest
>>> >> > of it. A browser doesn't yet have this capability I believe.
>>> >
>>> > "wget" and "curl" support resum broken download...
>>> >
>>> >> $_SERVER['HTTP_RANGE']
>>> >>
>>> >> ???
>>> >
>>> > Hmmm, what is the value of this VAR?
>>> >
>>> > The BYTE where to start?  If yes, how can I include this in my script?
>>> >
>>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
>>> > sending, but how to skip it?
>>> >
>>> > Or I am wrong with fread()?
>>> >
>>> > Thanks, Greetings and nice Day/Evening
>>> >Michelle Konzack
>>> >Systemadministrator
>>> >24V Electronic Engineer
>>> >Tamay Dogan Network
>>> >Debian GNU/Linux Consultant
>>> >
>>> >
>>> > --
>>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
>>> > # Debian GNU/Linux Consultant #
>>> >    
>>> > Michelle Konzack   Apt. 917  ICQ #328449886
>>> > +49/177/935194750, rue de Soultz MSN LinuxMichi
>>> > +33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>>> >
>>>
>>> I don't know how it works, just know of it.
>>>
>>> Maybe I'm misunderstanding you, but are you looking for fseek?
>>>
>>> http://us3.php.net/manual/en/function.fseek.php
>>>
>> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
>> anything about it online that actually says what it does, and when and
>> what sets it. I can find lots of script listings that use it, but
>> without knowing what it is, I don't know what to make of it.
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>
> It's an HTTP header, sent in the HTTP request as Range: .
> According to the CGI spec it's made available to CGI programs by the
> server in the HTTP_RANGE environment variable, so PHP picks it up and
> adds it to the $_SERVER array.
>
>
> Torben
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Lars Torben Wilson
2009/1/3 Ashley Sheridan :
> On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
>> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>>  wrote:
>> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> >> > I don't think this is actually possible. I've never seen it happen
>> >> > before. It would need some sort of dedicated client-side software to
>> >> > recognise exactly how much has been downloaded and then request the rest
>> >> > of it. A browser doesn't yet have this capability I believe.
>> >
>> > "wget" and "curl" support resum broken download...
>> >
>> >> $_SERVER['HTTP_RANGE']
>> >>
>> >> ???
>> >
>> > Hmmm, what is the value of this VAR?
>> >
>> > The BYTE where to start?  If yes, how can I include this in my script?
>> >
>> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
>> > sending, but how to skip it?
>> >
>> > Or I am wrong with fread()?
>> >
>> > Thanks, Greetings and nice Day/Evening
>> >Michelle Konzack
>> >Systemadministrator
>> >24V Electronic Engineer
>> >Tamay Dogan Network
>> >Debian GNU/Linux Consultant
>> >
>> >
>> > --
>> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
>> > # Debian GNU/Linux Consultant #
>> >    
>> > Michelle Konzack   Apt. 917  ICQ #328449886
>> > +49/177/935194750, rue de Soultz MSN LinuxMichi
>> > +33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>> >
>>
>> I don't know how it works, just know of it.
>>
>> Maybe I'm misunderstanding you, but are you looking for fseek?
>>
>> http://us3.php.net/manual/en/function.fseek.php
>>
> Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
> anything about it online that actually says what it does, and when and
> what sets it. I can find lots of script listings that use it, but
> without knowing what it is, I don't know what to make of it.
>
>
> Ash
> www.ashleysheridan.co.uk

It's an HTTP header, sent in the HTTP request as Range: .
According to the CGI spec it's made available to CGI programs by the
server in the HTTP_RANGE environment variable, so PHP picks it up and
adds it to the $_SERVER array.


Torben

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



Re: [PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Ashley Sheridan
On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote:
> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
>  wrote:
> > Am 2009-01-03 10:16:43, schrieb Eric Butera:
> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
> >> > I don't think this is actually possible. I've never seen it happen
> >> > before. It would need some sort of dedicated client-side software to
> >> > recognise exactly how much has been downloaded and then request the rest
> >> > of it. A browser doesn't yet have this capability I believe.
> >
> > "wget" and "curl" support resum broken download...
> >
> >> $_SERVER['HTTP_RANGE']
> >>
> >> ???
> >
> > Hmmm, what is the value of this VAR?
> >
> > The BYTE where to start?  If yes, how can I include this in my script?
> >
> > I mean, if I fread() I must skip this ammount of BYTES  and  then  start
> > sending, but how to skip it?
> >
> > Or I am wrong with fread()?
> >
> > Thanks, Greetings and nice Day/Evening
> >Michelle Konzack
> >Systemadministrator
> >24V Electronic Engineer
> >Tamay Dogan Network
> >Debian GNU/Linux Consultant
> >
> >
> > --
> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
> > # Debian GNU/Linux Consultant #
> >    
> > Michelle Konzack   Apt. 917  ICQ #328449886
> > +49/177/935194750, rue de Soultz MSN LinuxMichi
> > +33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)
> >
> 
> I don't know how it works, just know of it.
> 
> Maybe I'm misunderstanding you, but are you looking for fseek?
> 
> http://us3.php.net/manual/en/function.fseek.php
> 
Where does $_SERVER['HTTP_RANGE'] come from then, as I can't find
anything about it online that actually says what it does, and when and
what sets it. I can find lots of script listings that use it, but
without knowing what it is, I don't know what to make of it.


Ash
www.ashleysheridan.co.uk


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



[PHP] Re: If I make a mistake logging in, the error shows again even if I enter the right values

2009-01-03 Thread Fred Silsbee



--- On Sun, 1/4/09, Fred Silsbee  wrote:

> From: Fred Silsbee 
> Subject: If I make a mistake logging in, the error shows again even if I 
> enter the right values
> To: php...@lists.php.net, php-general@lists.php.net
> Date: Sunday, January 4, 2009, 2:45 AM
> my PHP programs are working great to access Oracle 11g1 and
> MySQL 5.1
> 
> I entered a bad value for user name /passwordand got a
> message 
> Could not connect: Access denied for user
> 'landon'@'localhost' (using password: YES)
> 
> I restarted the script under Firefox 3.0.5 and got the same
> error message without a chance to enter username/password 
> 
> If I clean the cache, it works OK
> 
> This problem only occurs with the MySQL script that is
> nearly identical to the Oracle script that doesn't show
> the problem.
> 
> This must be a familiar problem with you web programmers!

The problem is correctable with ordinary programming logic.


  


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



[PHP] If I make a mistake logging in, the error shows again even if I enter the right values

2009-01-03 Thread Fred Silsbee
my PHP programs are working great to access Oracle 11g1 and MySQL 5.1

I entered a bad value for user name /passwordand got a message 
Could not connect: Access denied for user 'landon'@'localhost' (using password: 
YES)

I restarted the script under Firefox 3.0.5 and got the same error message 
without a chance to enter username/password 

If I clean the cache, it works OK

This problem only occurs with the MySQL script that is nearly identical to the 
Oracle script that doesn't show the problem.

This must be a familiar problem with you web programmers!


  


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



[PHP] email app/script/needs...

2009-01-03 Thread bruce
HI...

Playing around with an app and I need to implement some functionality
allowing a user to email some text.

Basically, I want to allow the user to select some text from a dropdown
list. I then want to allow the user to edit the text if needed, and to then
submit the text for email to a given user. In order to perform some basic
QA, I want to have an additional user be notified of the email/text to be
sent, and to then have to authorize the email/text in order for it to be
sent.

The QA process is required as this is going to be part of a kind of stripped
down call center process.

I'm asking the list to see if anyone has come across this kind of
functionality in an app that you can point me to. I've been searching the
'net with no luck, and I'd rather not reinvent the wheel on this one..

Pointers/Comments appreciated!

Thanks!!!




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



Re: [PHP] IE Problem Detecting Post Variables

2009-01-03 Thread Micah Gersten
Ashley Sheridan wrote:
> On Fri, 2009-01-02 at 18:06 -0500, Andrew Ballard wrote:
>   
>> On Fri, Jan 2, 2009 at 1:15 PM, Micah Gersten  wrote:
>> 
>>> You might want to consider the button element which allows you to
>>> display images, but doesn't send back coordinates.  Instead it sends a
>>> preset value.
>>> http://www.w3.org/TR/html401/interact/forms.html#h-17.5
>>>
>>> Thank you,
>>> Micah Gersten
>>>   
>> If you mean an INPUT element with the type="button", then yes.
>> (Although it will no longer be a submit button, so you'll have to
>> capture the click and perform the submit using Javascript which leads
>> back to accessibility issues, etc.)
>>
>> If you mean a BUTTON element of the type="submit", then not exactly.
>> It *will* send a preset value for sure, but that preset value will
>> differ depending on the browser. I've found that while FF will send
>> the value you set in the value="..." attribute, IE will send the
>> actual text of the button. Thus,
>>
>> My Button Text
>>
>> will send 'test=blue' in FF, but 'test=My+Button+Text' in IE. I'm
>> assuming this is because for  buttons, the text
>> content of the button IS the value in the value="..." attribute.
>>
>> Whatever the reason, that was a fun lesson to track down the first
>> time I had people tell me a page I wrote didn't work in IE.
>>
>> Andrew
>>
>> 
> Lets all march forward and renounce IE as a useful piece of software!
>
>
> Ash
> www.ashleysheridan.co.uk
>   

Agreed.  According to the spec, the FF action is correct.  I just heard
IE's user share dropped below 70%.  One day we will hopefully be able to
say goodbye to it.

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





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



Re: [PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Eric Butera
On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack
 wrote:
> Am 2009-01-03 10:16:43, schrieb Eric Butera:
>> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
>> > I don't think this is actually possible. I've never seen it happen
>> > before. It would need some sort of dedicated client-side software to
>> > recognise exactly how much has been downloaded and then request the rest
>> > of it. A browser doesn't yet have this capability I believe.
>
> "wget" and "curl" support resum broken download...
>
>> $_SERVER['HTTP_RANGE']
>>
>> ???
>
> Hmmm, what is the value of this VAR?
>
> The BYTE where to start?  If yes, how can I include this in my script?
>
> I mean, if I fread() I must skip this ammount of BYTES  and  then  start
> sending, but how to skip it?
>
> Or I am wrong with fread()?
>
> Thanks, Greetings and nice Day/Evening
>Michelle Konzack
>Systemadministrator
>24V Electronic Engineer
>Tamay Dogan Network
>Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> # Debian GNU/Linux Consultant #
>    
> Michelle Konzack   Apt. 917  ICQ #328449886
> +49/177/935194750, rue de Soultz MSN LinuxMichi
> +33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>

I don't know how it works, just know of it.

Maybe I'm misunderstanding you, but are you looking for fseek?

http://us3.php.net/manual/en/function.fseek.php

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



RE: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Andrés Robinet
> -Original Message-
> From: Behzad [mailto:behzad.esl...@gmail.com]
> Sent: Thursday, January 01, 2009 12:43 PM
> To: Zend Framework General; PHP General Mailing List; IxDA
> Subject: [PHP] Thank you everyone, What a wonderful world
> 
> Hi List,
> 
> I would like to appreciate from you all. I hope that you enjoy your
> holidays.
> Children (yes! children) are dying in Gaza, and we're safe! We're happy.
> Happy Christmas!!
> Thank you for supporting Israel, and for being so quite. The God is with
> you!
> 
> How Palestinians defend(!) themselves with stones, and how Zionist are
> performing
> a new holocaust using the American weapons in a prison, named Gaza strip.
> But you now what... this is really good. At least this could bring
> democracy, and freedom to
> middle east. PEACE! HUMAN RIGHTS! YEAH! a lot of bullshit !!.
> 
> We're all responsible for this event. What a shame for mankind in 21th
> century.
> 
> Forget this. This is SPAM and/or PROPAGANDA!
> 
> CHEERS!
> -behzad

First off, I don't think this is the place to get involved into a political 
discussion. No matter how much blood is spread, or who's the devil, this is all 
about politics, and power, and we are not politicians but programmers. This is 
a Zend Framework mailing list, not a human rights forum or an office of the UN. 
So, yes, what you are saying is SPAM and PROPAGANDA, since it was unsolicited 
and has arrived to the wrong place. If you want us to support your cause, it is 
not the place to ask for it. Nobody is going to add a banner to his website 
saying "Long live Hamas" just because you post a message in the Zend Framework 
list, on the contrary, you'll generate just the opposite feeling.

Second, if peace and human rights are bullshit for you, I don't know what you 
are asking for: WAR and HUMAN RIGHTS VIOLATION? Peace and human rights are not 
bullshit just because a bullshitter speaks about them. It is precisely that 
kind of speech ("Mr X is a bullshitter, Mr X speaks about peace, ergo, peace is 
bullshit") which leads to more war, more harm and more bullshitters talking 
about peace and human rights. About democracy and freedom, that is precisely 
why you can post a message like this without being tortured and killed (you are 
not even being sent off this list). Try that in Iran or Cuba (if you can get an 
internet connection there). You don't need to believe in democracy and freedom, 
go and praise dictators and build a prison in your country for the ones who 
don't agree with you, but don't come to me saying that it's democracy's fault 
or freedom's fault that children are being killed... it is a bit more complex 
than that, and without democracy and freedom, there would be hundreds of 
thousands instead of just hundreds dead.

Thanks to democracy and freedom I can say that "Bush is an idiot son of a 
bitch", write it on a billboard, make a t-shirt with that slogan and say it to 
his face if I ever see him nearby. That won't solve world hunger, but at least 
I can complain and do something without being killed. I can say the same about 
my president, I'm not an American citizen, I don't live in the US, but my 
country has a democracy, a very corrupt democracy, and I prefer that to the 
dictatorship we had twenty five years ago. Some principles, such as freedom, 
are not tradable.

Third, you are confusing Palestinians with Hamas, not every Palestinian is a 
Hamas member. And NO, we are NOT RESPONSIBLE for this event, Hamas and the 
Israel government are, NOT US. Hamas decided to end the truce and start 
launching rockets and the Israel government decided to bombard them, that's how 
history is written. And it has nothing to do with the average Palestinian or 
Israeli citizen. I didn't decide to invade Falkland in 1982, the dictatorship 
we had took that decision, and thousands of young Argentine soldiers died 
because of a wimp. And yes, I believe Falkland is Argentine, but I will never 
support a military invasion to the islands just because of that belief.

And fourth, I've not seen the same protests worldwide every time a terrorist 
attack kills hundreds of people... I didn't see the left wing parties of my 
country complaining on September 11th when 3000 people died, they were actually 
drinking to celebrate, the same happened when a car bomb destroyed Israeli 
embassy in my country (detonated by Iranian terrorists)... How come now they 
are protesting at the same Israeli embassy? What kind of coherence is that? Are 
they supporting peace or just violence when it occurs from one side alone? Now, 
THAT IS BULLSHIT and I'm tired of it.

Regards,

Rob


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



[PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Michelle Konzack
Am 2009-01-03 10:16:43, schrieb Eric Butera:
> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
> > I don't think this is actually possible. I've never seen it happen
> > before. It would need some sort of dedicated client-side software to
> > recognise exactly how much has been downloaded and then request the rest
> > of it. A browser doesn't yet have this capability I believe.

"wget" and "curl" support resum broken download...

> $_SERVER['HTTP_RANGE']
> 
> ???

Hmmm, what is the value of this VAR?

The BYTE where to start?  If yes, how can I include this in my script?

I mean, if I fread() I must skip this ammount of BYTES  and  then  start
sending, but how to skip it?

Or I am wrong with fread()?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
   
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread tedd

At 5:55 PM + 1/3/09, Nathan Rixham wrote:

oooh oooh found it, there's a few solutions actually!

array_merge($christianity,$islam);
unset($religion);


I prefer:

unlink($the_entire_mess);

Cheers,

tedd

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

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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Lepidosteus
> A six-to-one ratio of terrorists:civilians really is not that bad

Ouch.

-- 
Vianney Devreese - Lepidosteus
http://lepidosteus.com

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



Re: [PHP] Searching in a long text

2009-01-03 Thread Andrew Ballard
On Sat, Jan 3, 2009 at 4:28 AM, Yeti  wrote:
> What if the whole text has only 1 line?
>

I would worry more (though probably not much) about the fringe cases
where a match spans across lines (or pages) such that it would either
prevent a qualifying match from being returned at all, or a highly
relevant result could be returned at the bottom of the list as two
less-relevant results because of the line split.

Andrew

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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Larry Garfield
On Saturday 03 January 2009 1:17:07 pm Dotan Cohen wrote:
> 2009/1/3 Behzad :
> > since you have modern weapons, equipped
> > with lasers!
>
> Did somebody say sharks with frigin' lasers?

No, but we have some ill-tempered sea-bass.

-- 
Larry Garfield
la...@garfieldtech.com

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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Dotan Cohen
2009/1/3 Behzad :
> since you have modern weapons, equipped
> with lasers!

Did somebody say sharks with frigin' lasers?

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Dotan Cohen
2009/1/3 Daniel Brown :
> On Sat, Jan 3, 2009 at 14:00, Behzad  wrote:
>>
>> Who are we? Vampires or Blinds?
>
>Worse.  We're geeks.
>

And we have a troll in our midst.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Daniel Brown
On Sat, Jan 3, 2009 at 14:00, Behzad  wrote:
>
> Who are we? Vampires or Blinds?

Worse.  We're geeks.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Behzad
Enjoy ! Be Happy ! Let's free the Gaza! Let's bring there Democracy ! YEAH!
Hamas is a terrorist group, and since it is elected by Gaza's people, they
are terrorists, too!

... Enough already!

For you information:

1) http://en.wikipedia.org/wiki/Sabra_and_Shatila_massacre
2) http://en.wikipedia.org/wiki/2006_Qana_airstrike

KILL TERRORIST! Kill all of those terrorist, including those women and
children! Victory is yours.
Soldiers! Don't make any mistake, since you have modern weapons, equipped
with lasers!
Use your modern war machine; Use F16 and 100-ton bombs to kill,
Do not let them to throw stones at you. Do not let them to leave the land.
Do not let them to have food.
Oh My God ! Look at their rockets... Look at those hand-made toys! How
miserable these terrorists are!

Who are we? Vampires or Blinds?


On Sat, Jan 3, 2009 at 9:59 PM, Dotan Cohen  wrote:

> WTF? Isn't it the Gaza government (Hamas) that chooses to build
> rockets instead of buying food for it's citizens? So long at Hamas is
> in charge both the Gaza residents and the Israelis will suffer. Let's
> hope this finally roots them out for good.
>
> By the way, of the 400+ killed in Gaza, about 70 were civilians. A
> six-to-one ratio of terrorists:civilians really is not that bad,
> especially considering that the Hamas hide among the civilians. Hell,
> they take kids with them, crying, when they launch rockets just so
> that they can say that another kid was killed if they get intercepted.
> According to the Geneva convention, it is _Hamas_ that is responsible
> for the civilian deaths in Gaza.
>
> By the way, Egypt (who knows better than anyone else in the world)
> blames Hamas fully for what has happened in the past week.
>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
>
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
> ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
> А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
> а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
> ä-ö-ü-ß-Ä-Ö-Ü
>



-- 
Kind regards,
-behzad


Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Dotan Cohen
WTF? Isn't it the Gaza government (Hamas) that chooses to build
rockets instead of buying food for it's citizens? So long at Hamas is
in charge both the Gaza residents and the Israelis will suffer. Let's
hope this finally roots them out for good.

By the way, of the 400+ killed in Gaza, about 70 were civilians. A
six-to-one ratio of terrorists:civilians really is not that bad,
especially considering that the Hamas hide among the civilians. Hell,
they take kids with them, crying, when they launch rockets just so
that they can say that another kid was killed if they get intercepted.
According to the Geneva convention, it is _Hamas_ that is responsible
for the civilian deaths in Gaza.

By the way, Egypt (who knows better than anyone else in the world)
blames Hamas fully for what has happened in the past week.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Robert Cummings
On Sat, 2009-01-03 at 17:55 +, Nathan Rixham wrote:
> oooh oooh found it, there's a few solutions actually!
> 
> array_merge($christianity,$islam);
> unset($religion);
> //loads more

Sounds like a better solution than:



:)

> Nathan Rixham wrote:
> > rob, are you suggesting that the solution to the problems in the middle 
> > east is to be found lurking somewhere on the php.net site? perhaps with 
> > a little code example to show us how it's done?
> > 
> > lolol great

Well the post seemed a bit out of context, so I was merely indicating a
good place to start one's search for a PHP problem that seemed awfully
vague... without getting myself involved with picking either side.
Certainly I can sympathize with dying-- anywhere-- but the concept of
unending conflict rather than peace goes somewhat over my head.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Nathan Rixham

oooh oooh found it, there's a few solutions actually!

array_merge($christianity,$islam);
unset($religion);
//loads more

Nathan Rixham wrote:
rob, are you suggesting that the solution to the problems in the middle 
east is to be found lurking somewhere on the php.net site? perhaps with 
a little code example to show us how it's done?


lolol great

Robert Cummings wrote:

I find the PHP site to be one of the best resources around. Maybe it can
help you with your problem.

Cheers,
Rob.



On Sat, 2009-01-03 at 08:56 +0330, shahrzad khorrami wrote:
I'm sorry for there are no rules in the world  no real men to help 
them. May

*Allah* help them
as we see what happened in *Iraq* who started war with Iran and just 
he can!
I believe because I can't see any power in men to do that. 
America is

behind Israel and other countries really are too weak and timid to help.
just pray for them..
thanks behzad





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



Re: [PHP] Thank you everyone, What a wonderful world

2009-01-03 Thread Nathan Rixham
rob, are you suggesting that the solution to the problems in the middle 
east is to be found lurking somewhere on the php.net site? perhaps with 
a little code example to show us how it's done?


lolol great

Robert Cummings wrote:

I find the PHP site to be one of the best resources around. Maybe it can
help you with your problem.

Cheers,
Rob.



On Sat, 2009-01-03 at 08:56 +0330, shahrzad khorrami wrote:

I'm sorry for there are no rules in the world  no real men to help them. May
*Allah* help them
as we see what happened in *Iraq* who started war with Iran and just he can!
I believe because I can't see any power in men to do that. America is
behind Israel and other countries really are too weak and timid to help.
just pray for them..
thanks behzad



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



[PHP] Re: =.='' what wrong ? just simple code, however error.

2009-01-03 Thread Martin Zvarík

It works as expected on my PHP 5.2.4


LKSunny napsal(a):

";
}
//i don't know why, when run this code, on 91.3  after expect is 91.2, 
however..91.2001

//who can help me ? and tell me why ?

//Thank You.
?>




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



[PHP] Re: Please point me in the right direction

2009-01-03 Thread Al



David Knapp wrote:

Greetings,

I need to create a secure customer section on my site. User name and login 
would take you to a secured page that displays information like a calendar, 
downloads, budgets. These sections would be the same but each customer would 
display custom content (over 100 customers).

I browsed php & mysql books, but need a jump start. Any ideas? Is php not the 
best solution? If you can't tell, I'm a newbie.

David


  



You said "secure"! I'd highly recommend looking for a finished product 
designed by pros.  Designing a secure application is not for newbies.


Al...

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



Re: [PHP] Please point me in the right direction

2009-01-03 Thread tedd

At 8:20 PM -0800 1/2/09, David Knapp wrote:

Greetings,

I need to create a secure customer section on my site. User name and 
login would take you to a secured page that displays information 
like a calendar, downloads, budgets. These sections would be the 
same but each customer would display custom content (over 100 
customers).


I browsed php & mysql books, but need a jump start. Any ideas? Is 
php not the best solution? If you can't tell, I'm a newbie.


David



David:

So what's your question?

Do you want a secure area, calendar downloads, budgets, or what?

All you say you want can be done in php. If you want to do it 
yourself, you probably could write some of the code after a few 
months of study. But if you want it done sooner, then hire one of us.


Cheers,

tedd

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

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



Re: [PHP] Number Punctuator

2009-01-03 Thread Phpster

Number_format()

Bastien

Sent from my iPod

On Jan 3, 2009, at 10:47 AM, Alec Wright  wrote:


Hey all, is there a php function to punctuate a number?
eg 3482957239525 would become 3,482,957,239,525 and 274018 would  
become

274,018 etc

Thanks :)


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



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



[PHP] Number Punctuator

2009-01-03 Thread Alec Wright
Hey all, is there a php function to punctuate a number?
eg 3482957239525 would become 3,482,957,239,525 and 274018 would become
274,018 etc

Thanks :)


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



Re: [PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Eric Butera
On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan
 wrote:
> On Sat, 2009-01-03 at 13:27 +0100, Michelle Konzack wrote:
>> Good morning Jim,
>>
>> Thank your for your help, I will now adapt my scripts and test it.
>>
>> And if a user had done a partial download, how can I set the pointer  to
>> resume the download?  I personaly find websites offering  downloads  but
>> not resuming very annoying, so I like to do it better...  :-)
>>
>> I know I have to get a $_HTTP[''] header for  the  partial  request,
>> but which?  And then I have too seek fread() right?  But how?
>>
>> > Then here, do this...
>> >
>> > $current_size = 0;
>> > while ( !feof($HANDLER) ) {
>> > $current_size += $buffer;
>> > echo fread($HANDLE, $buffer);
>> > }
>> >
>> > Now, do what you want with $current_size
>> >
>> > Maybe have a variable that you check it against that contains the users
>> > allow amount of transfer...
>> >
>> > $current_size = 0;
>> > while ( !feof($HANDLER) && $current_size < $allowed_limit ) {
>> > $current_size += $buffer;
>> > echo fread($HANDLE, $buffer);
>> > }
>> >
>> > Hope this gets you leading down the right path...
>>
>> Yes.  :-)
>>
>> However, I do not want to break downloads...
>> So I check the $current_size AFTER each  completed  download  and  since
>> $USER can only download one file at once, it  should  work  without  any
>> problems.
>>
>> Thanks, Greetings and nice Day/Evening
>> Michelle Konzack
>> Systemadministrator
>> 24V Electronic Engineer
>> Tamay Dogan Network
>> Debian GNU/Linux Consultant
>>
>>
> I don't think this is actually possible. I've never seen it happen
> before. It would need some sort of dedicated client-side software to
> recognise exactly how much has been downloaded and then request the rest
> of it. A browser doesn't yet have this capability I believe.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


$_SERVER['HTTP_RANGE']

???

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



Re: [PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Ashley Sheridan
On Sat, 2009-01-03 at 13:27 +0100, Michelle Konzack wrote:
> Good morning Jim,
> 
> Thank your for your help, I will now adapt my scripts and test it.
> 
> And if a user had done a partial download, how can I set the pointer  to
> resume the download?  I personaly find websites offering  downloads  but
> not resuming very annoying, so I like to do it better...  :-)
> 
> I know I have to get a $_HTTP[''] header for  the  partial  request,
> but which?  And then I have too seek fread() right?  But how?
> 
> > Then here, do this...
> > 
> > $current_size = 0;
> > while ( !feof($HANDLER) ) {
> > $current_size += $buffer;
> > echo fread($HANDLE, $buffer);
> > }
> > 
> > Now, do what you want with $current_size
> > 
> > Maybe have a variable that you check it against that contains the users 
> > allow amount of transfer...
> > 
> > $current_size = 0;
> > while ( !feof($HANDLER) && $current_size < $allowed_limit ) {
> > $current_size += $buffer;
> > echo fread($HANDLE, $buffer);
> > }
> > 
> > Hope this gets you leading down the right path...
> 
> Yes.  :-)
> 
> However, I do not want to break downloads...
> So I check the $current_size AFTER each  completed  download  and  since
> $USER can only download one file at once, it  should  work  without  any
> problems.
> 
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> 24V Electronic Engineer
> Tamay Dogan Network
> Debian GNU/Linux Consultant
> 
> 
I don't think this is actually possible. I've never seen it happen
before. It would need some sort of dedicated client-side software to
recognise exactly how much has been downloaded and then request the rest
of it. A browser doesn't yet have this capability I believe.


Ash
www.ashleysheridan.co.uk


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



[PHP] Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Michelle Konzack
Good morning Jim,

Thank your for your help, I will now adapt my scripts and test it.

And if a user had done a partial download, how can I set the pointer  to
resume the download?  I personaly find websites offering  downloads  but
not resuming very annoying, so I like to do it better...  :-)

I know I have to get a $_HTTP[''] header for  the  partial  request,
but which?  And then I have too seek fread() right?  But how?

> Then here, do this...
> 
> $current_size = 0;
> while ( !feof($HANDLER) ) {
>   $current_size += $buffer;
>   echo fread($HANDLE, $buffer);
> }
> 
> Now, do what you want with $current_size
> 
> Maybe have a variable that you check it against that contains the users 
> allow amount of transfer...
> 
> $current_size = 0;
> while ( !feof($HANDLER) && $current_size < $allowed_limit ) {
>   $current_size += $buffer;
>   echo fread($HANDLE, $buffer);
> }
> 
> Hope this gets you leading down the right path...

Yes.  :-)

However, I do not want to break downloads...
So I check the $current_size AFTER each  completed  download  and  since
$USER can only download one file at once, it  should  work  without  any
problems.

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
   
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


SV: SV: [PHP] Sending files via POST

2009-01-03 Thread Anders Norrbring
> Nathan Rixham's original email.  Hope it helps!
> 
> On Thu, Jan 1, 2009 at 09:35, Nathan Rixham  wrote:
> >
> > after having a flick through the source it looks like a limitation of
> http
> > request;
> >
> http://pear.php.net/package/HTTP_Request/docs/latest/__filesource/fsour
> ce_HTTP_Request__HTTP_Request-1.4.4Request.php.html
> > check lines around 600 and 900+
> >
> > you'd have to set the http request yourself i thinks! (setBody)
> >
> > may be worth contacting they who maintain the package
> >


Thanks Daniel.
I sure looks like I have to either do it manually, or modify the HTTP
Request code myself, something I'm a bit reluctant to do..

I guess the better way is to learn how to build the HTTP body and use the
setBody method, so I'll do some Googling on the subject if somebody here
can't point me to a good 'how-to' right away..

Anders.



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



Re[2]: [PHP] Searching in a long text

2009-01-03 Thread Vicente
Richard wrote:

> You could look into using Zend_Search_Lucene, which is part of the
> Zend framework. It's file based and so doesn't require the use of
> MySQL. Might make it slightly more portable if that's a concern. It
> will be a little more work than simply using MySQL, but it would be
> worth it I think.

well, that's more devoted to obtain a typical search engine results
in a Google style. What I need is something similar of what happens
searching inside books in Google Books:
http://books.google.com/books?hl=en&id=uaZQMAAJ&dq=pghp+advanced&q=engine&pgis=1#search_anchor


about Robert thoughts:

> I'd store each line of text in the database along with
> the page and line number for indexing. Then using full text search I'd
> retrieve appropriate lines that match the search query. Upon retrieving
> the matching lines, I'd then proceed to pull the accompanying lines by
> incrementing/decrementing the line number found and using an IN() clause
> for matching the various IDs in a single query.

I wonder if storing every line in its field can cause an enormous
table of registers. The book has 580 pages, 40 lines/page gives a
table with 23.200 registers.
Is this size a bad idea regarding resources and speed results?.
Because I will need to parse every field contents when searching the 
words. 

I'm asking before starting to divide and import the book.

Thanks for the help,



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



Re: [PHP] Searching in a long text

2009-01-03 Thread Richard Heyes
> ...

You could look into using Zend_Search_Lucene, which is part of the
Zend framework. It's file based and so doesn't require the use of
MySQL. Might make it slightly more portable if that's a concern. It
will be a little more work than simply using MySQL, but it would be
worth it I think.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th)

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



Re: [PHP] Searching in a long text

2009-01-03 Thread Robert Cummings
On Sat, 2009-01-03 at 01:28 -0800, Yeti wrote:
> What if the whole text has only 1 line?

What if? Shouldn't matter.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Searching in a long text

2009-01-03 Thread Robert Cummings
On Sat, 2009-01-03 at 09:26 +0100, Vicente wrote:
> Hi all,
> 
> I'm implementing a search tool to find phrases inside a book.
> Users will search for some word, then the engine will returns
> the 3 or 4 lines containing that word, and giving also the book page
> number. 
> 
> I have the book in plain text and the doubt is about different
> approaches in order to be speedy and saving memory and resources:
> 
> - adding every text page inside fields of one MySQL table.
> 
> - having the whole book as a unique text file, with some marks in
> every page to delimit and parse the page number
> 
> 
> Also, I want to know if there is some possibility to make the same
> using PDF files.

If it were me, I'd store each line of text in the database along with
the page and line number for indexing. Then using full text search I'd
retrieve appropriate lines that match the search query. Upon retrieving
the matching lines, I'd then proceed to pull the accompanying lines by
incrementing/decrementing the line number found and using an IN() clause
for matching the various IDs in a single query.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Searching in a long text

2009-01-03 Thread Yeti
What if the whole text has only 1 line?

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



[PHP] Searching in a long text

2009-01-03 Thread Vicente
Hi all,

I'm implementing a search tool to find phrases inside a book.
Users will search for some word, then the engine will returns
the 3 or 4 lines containing that word, and giving also the book page
number. 

I have the book in plain text and the doubt is about different
approaches in order to be speedy and saving memory and resources:

- adding every text page inside fields of one MySQL table.

- having the whole book as a unique text file, with some marks in
every page to delimit and parse the page number


Also, I want to know if there is some possibility to make the same
using PDF files.


thanks in advance






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