php-general Digest 5 Sep 2008 17:40:29 -0000 Issue 5665

Topics (messages 279549 through 279565):

Re: Google Chrome
        279549 by: Peter Ford
        279550 by: Peter Ford
        279551 by: Richard Heyes
        279552 by: Yeti
        279553 by: Jochem Maas
        279554 by: Boyd, Todd M.
        279555 by: Eric Butera

Header() - POST
        279556 by: Dan Joseph
        279557 by: Wolf
        279558 by: Dan Joseph
        279559 by: Boyd, Todd M.
        279560 by: Stut
        279561 by: Dan Joseph
        279562 by: Boyd, Todd M.
        279563 by: mike
        279564 by: Luke

Sending POST variables without html code
        279565 by: R B

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 ---
Shawn McKenzie wrote:
Per Jessen wrote:
Stut wrote:

On 2 Sep 2008, at 20:23, Diogo Neves wrote:
Now is the time ;)
Indeed: http://www.google.com/chrome

But only for Windows for now :(


I guess we'll have to wait a little longer then ...


/Per Jessen, Zürich

Will somebody volunteer to test on Wine or Mono?

-Shawn

Tried on Wine (version 0.9.60 on OpenSuse) and I could even get the downloader to start.
To be fair, I've never really got anything to work on Wine...


--
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
Per Jessen wrote:
Stut wrote:

On 2 Sep 2008, at 20:23, Diogo Neves wrote:
Now is the time ;)
Indeed: http://www.google.com/chrome

But only for Windows for now :(


I guess we'll have to wait a little longer then ...


/Per Jessen, Zürich

Will somebody volunteer to test on Wine or Mono?

-Shawn

Tried on Wine (version 0.9.60 on OpenSuse) and I could even get the downloader to start.
To be fair, I've never really got anything to work on Wine...


--
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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

> There's an option for pre-buffering things, I believe.

Where?

-- 
Richard Heyes

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

--- End Message ---
--- Begin Message ---
> > I uninstalled it precisely beacause of this behaviour. The disk was
> > running crazy every time chrome was started.
> > And I don't know how to do "lsof | grep chrome" on Windows to see what's
> > going on.

LSOF for winblows:

http://download.sysinternals.com/Files/ProcessMonitor.zip

--- End Message ---
--- Begin Message ---
Robert Cummings schreef:
On Fri, 2008-09-05 at 03:15 +0200, Jochem Maas wrote:
Bastien Koert schreef:
On Thu, Sep 4, 2008 at 5:22 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:

Bastien Koert schreef:

On Thu, Sep 4, 2008 at 4:31 PM, Dan Shirah <[EMAIL PROTECTED]> wrote:

 Yippie, Chrome already exploited for DoS attacks?
http://blogs.zdnet.com/security/?p=1847&tag=nl.e539


Its not a DoS, its just a browser crash

so forcing a browser to crash is not 'Denial of Service'?

I think your confused with DDoS


DDoS is a Distributed Denial of Service attack where a server is attacked
via multiple computers (like a bot net) at the same time AFAIK
no shit. so if you drop the 'Distributed' you get 'Denial of Service'. DoS
is rather general, code that keeps crashing your browser on purpose is denying
you the service it provides (viewing webpages).

rather like someone running off with your girlfriend ... you get denied service.

I thought Chrome was set up so if your current page caused a crash other
loaded pages didn't crash also. In which case DoS doesn't apply if only
the requested page crashes since you're still getting service.

yes, and somebody already showed how to crash the whole damn app.
type 'evil:%', for example, into the addressbar IIRC

:-D


Cheers,
Rob.


--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2008 6:53 AM
> To: Robert Cummings
> Cc: Bastien Koert; Dan Shirah; [EMAIL PROTECTED]; List_PHP_General
> Subject: Re: [PHP] Google Chrome
> 
> Robert Cummings schreef:
> > On Fri, 2008-09-05 at 03:15 +0200, Jochem Maas wrote:
> >> Bastien Koert schreef:
> >>> On Thu, Sep 4, 2008 at 5:22 PM, Jochem Maas <[EMAIL PROTECTED]>
> wrote:
> >>>
> >>>> Bastien Koert schreef:
> >>>>
> >>>>> On Thu, Sep 4, 2008 at 4:31 PM, Dan Shirah <[EMAIL PROTECTED]>
> wrote:
> >>>>>
> >>>>>  Yippie, Chrome already exploited for DoS attacks?
> >>>>>> http://blogs.zdnet.com/security/?p=1847&tag=nl.e539
> >>>>>>
> >>>>>>
> >>>>> Its not a DoS, its just a browser crash
> >>>>>
> >>>> so forcing a browser to crash is not 'Denial of Service'?
> >>>>
> >>>> I think your confused with DDoS
> >>>>
> >>>>
> >>> DDoS is a Distributed Denial of Service attack where a server is
> attacked
> >>> via multiple computers (like a bot net) at the same time AFAIK
> >> no shit. so if you drop the 'Distributed' you get 'Denial of
> Service'. DoS
> >> is rather general, code that keeps crashing your browser on purpose
> is denying
> >> you the service it provides (viewing webpages).
> >>
> >> rather like someone running off with your girlfriend ... you get
> denied service.
> >
> > I thought Chrome was set up so if your current page caused a crash
> other
> > loaded pages didn't crash also. In which case DoS doesn't apply if
> only
> > the requested page crashes since you're still getting service.
> 
> yes, and somebody already showed how to crash the whole damn app.
> type 'evil:%', for example, into the addressbar IIRC

Yep, that'll do it. As soon as you type the %, it crashes. Anything
followed by ":%" seems to do it.

Also FWIW, I've crashed it with 5 tabs open when I tried to close one of
the tabs. Clicking the option to restart Chrome brought it back up with
all 5 tabs. Again, when I tried to close one, it crashed and reinstated
all 5 upon restart... ad nauseum.

Maybe I'm picky... but if a newly-released beta program crashes in the
first minute or two that I'm playing with, it proooooobably wasn't ready
for beta in the first place. My 2c.


Todd Boyd
Web Programmer




--- End Message ---
--- Begin Message ---
On Thu, Sep 4, 2008 at 9:15 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> rather like someone running off with your girlfriend ... you get denied
> service.

Burn of the week! :)

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

I am trying to figure out how to build a post string, and then user header
to post it.  I've done some research and I am not getting very far.

Basically what I'm doing is taking POST items, then validating them,
scrubbing them, and rebuidling the post string and trying to resubmitt it
using headers().  I'm getting this error:
ErrorCGI ErrorThe specified CGI application misbehaved by not returning a
complete set of HTTP headers.

Here is my header code, and the post string below it.  I don't have any idea
what I'm missing or doing wrong.  Any help is appreciated!

header( "POST /v2/order_submitorder.php HTTP/1.0" );
header( "Host: new.vtusa.com" );
header( "Content-Type: application/x-www-form-urlencoded" );
header( "Content-Length: " . strlen( $post_string ) );
header( $post_string );

Quote Management System
v3.00.0903PCompanyName=&PFirstName=Dan&PLastName=Joseph&PAddress1=123
Street&PAddress2=&PCity=Northville&PState=MI&PZipCode=48167&PEmailAddress=
[EMAIL 
PROTECTED]&PPhone=2485551212&PCellPhone=2485521212&PFax=&OFirstName=Jack&OLastName=Mother&OAddress1=456
Avenue&OAddress2=&OCity=Omaha&OState=Ne&OZipCode=68101&OPhone=248889999&OCellPhone=2487889999&DFirstName=Yohan&DLastName=Jacques&DAddress1=789
Boulevard&DAddress2=&DCity=Northville&DState=Mi&DZipCode=48167&DPhone=5867772222&DCellPhone=5866772222&VehicleVIN=1234567890ABCDEFG&VehicleYear=2007&VehicleMake=Honda&VehicleModel=Civic&VehicleColor=Grey&VehicleMiles=234234&ordersubmit=Submit
Order&UserID=90&QuoteID=427

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

--- End Message ---
--- Begin Message ---
<!-- SNIP -->
> scrubbing them, and rebuidling the post string and trying to resubmitt it
> using headers().  I'm getting this error:

Why do you want to re-submit it?

Why not just parse it in the same page?

If not that, then use sessions and set the information, do a meta-refresh to 
redirect to the processing page, then use the processing page to pull the 
session information and make sure it came from the correct page.

HTH,
Wolf

--- End Message ---
--- Begin Message ---
On Fri, Sep 5, 2008 at 11:48 AM, Wolf <[EMAIL PROTECTED]> wrote:

> <!-- SNIP -->
> > scrubbing them, and rebuidling the post string and trying to resubmitt it
> > using headers().  I'm getting this error:
>
> Why do you want to re-submit it?
>
> Why not just parse it in the same page?
>
> If not that, then use sessions and set the information, do a meta-refresh
> to redirect to the processing page, then use the processing page to pull the
> session information and make sure it came from the correct page.
>
> HTH,
> Wolf
>

Hmm good question on why I am re-submitting to a new page.  Honestly, I have
no good answer for that other than I have been rushing this part of the
system for two days to get it done.

I didn't think of Sessions, that's actually not a bad idea at all.  I am
going to re-think the re-submitting thing, and if I stick with it, I'll give
our session idea a shot.

Thanks for the idea!

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

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Dan Joseph [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2008 10:59 AM
> To: PHP General
> Subject: Re: [PHP] Header() - POST
> 
> On Fri, Sep 5, 2008 at 11:48 AM, Wolf <[EMAIL PROTECTED]> wrote:
> 
> > <!-- SNIP -->
> > > scrubbing them, and rebuidling the post string and trying to
> resubmitt it
> > > using headers().  I'm getting this error:
> >
> > Why do you want to re-submit it?
> >
> > Why not just parse it in the same page?
> >
> > If not that, then use sessions and set the information, do a meta-
> refresh
> > to redirect to the processing page, then use the processing page to
> pull the
> > session information and make sure it came from the correct page.
> >
> > HTH,
> > Wolf
> >
> 
> Hmm good question on why I am re-submitting to a new page.  Honestly,
I
> have
> no good answer for that other than I have been rushing this part of
the
> system for two days to get it done.
> 
> I didn't think of Sessions, that's actually not a bad idea at all.  I
> am
> going to re-think the re-submitting thing, and if I stick with it,
I'll
> give
> our session idea a shot.

I think what Wolf was getting at is... if the data you're scrubbing is
being re-submitted to the same page, why re-submit it at all? Why not
just scrub it and then do whatever it is you want to do with it instead
of putting an extra step in-between?

I see your model like this:
1.) Get POST data
2.) Scrub POST data
3.) Re-submit POST data
4.) Deal with POST data

Whereas I'm getting at this:
1.) Get POST data
2.) Scrub POST data
3.) Deal with POST data


Todd Boyd
Web Programmer




--- End Message ---
--- Begin Message ---
On 5 Sep 2008, at 16:43, Dan Joseph wrote:
I am trying to figure out how to build a post string, and then user header
to post it.  I've done some research and I am not getting very far.

Basically what I'm doing is taking POST items, then validating them,
scrubbing them, and rebuidling the post string and trying to resubmitt it
using headers().  I'm getting this error:
ErrorCGI ErrorThe specified CGI application misbehaved by not returning a
complete set of HTTP headers.

Here is my header code, and the post string below it. I don't have any idea
what I'm missing or doing wrong.  Any help is appreciated!

header( "POST /v2/order_submitorder.php HTTP/1.0" );
header( "Host: new.vtusa.com" );
header( "Content-Type: application/x-www-form-urlencoded" );
header( "Content-Length: " . strlen( $post_string ) );
header( $post_string );

You're trying to post to the browser which won't know how to handle it. The header() function is modifying the response headers that are being sent back to the browser, they do not create a new request.

If you want to do a new request I suggest looking at curl. If you actually want the browser to make the new request the only way is to return a hidden form and auto-submit it with JS. However, as someone else pointed out if that second request is coming back to the same server there probably isn't any need for a second request at all.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
On Fri, Sep 5, 2008 at 12:11 PM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:

> > -----Original Message-----
> > From: Dan Joseph [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 05, 2008 10:59 AM
> > To: PHP General
> > Subject: Re: [PHP] Header() - POST
> >
> > On Fri, Sep 5, 2008 at 11:48 AM, Wolf <[EMAIL PROTECTED]> wrote:
> >
> > > <!-- SNIP -->
> > > > scrubbing them, and rebuidling the post string and trying to
> > resubmitt it
> > > > using headers().  I'm getting this error:
> > >
> > > Why do you want to re-submit it?
> > >
> > > Why not just parse it in the same page?
> > >
> > > If not that, then use sessions and set the information, do a meta-
> > refresh
> > > to redirect to the processing page, then use the processing page to
> > pull the
> > > session information and make sure it came from the correct page.
> > >
> > > HTH,
> > > Wolf
> > >
> >
> > Hmm good question on why I am re-submitting to a new page.  Honestly,
> I
> > have
> > no good answer for that other than I have been rushing this part of
> the
> > system for two days to get it done.
> >
> > I didn't think of Sessions, that's actually not a bad idea at all.  I
> > am
> > going to re-think the re-submitting thing, and if I stick with it,
> I'll
> > give
> > our session idea a shot.
>
> I think what Wolf was getting at is... if the data you're scrubbing is
> being re-submitted to the same page, why re-submit it at all? Why not
> just scrub it and then do whatever it is you want to do with it instead
> of putting an extra step in-between?
>
> I see your model like this:
> 1.) Get POST data
> 2.) Scrub POST data
> 3.) Re-submit POST data
> 4.) Deal with POST data
>
> Whereas I'm getting at this:
> 1.) Get POST data
> 2.) Scrub POST data
> 3.) Deal with POST data
>
>
> Todd Boyd
> Web Programmer
>
>
>
>
I'm actually not posting back to the same page, I was posting to a different
one.  Which still, when he mentioned it, it didn't make sense why I am doing
that.  I am in agreement with you and Wolf.  I should just scrub it and deal
with it, not re-submit it off to another place.

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

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Dan Joseph [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2008 11:16 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Header() - POST
> 
> On Fri, Sep 5, 2008 at 12:11 PM, Boyd, Todd M. <[EMAIL PROTECTED]>
> wrote:
> 
> > > -----Original Message-----
> > > From: Dan Joseph [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, September 05, 2008 10:59 AM
> > > To: PHP General
> > > Subject: Re: [PHP] Header() - POST
> > >
> > > On Fri, Sep 5, 2008 at 11:48 AM, Wolf <[EMAIL PROTECTED]> wrote:
> > >
> > > > <!-- SNIP -->
> > > > > scrubbing them, and rebuidling the post string and trying to
> > > resubmitt it
> > > > > using headers().  I'm getting this error:
> > > >
> > > > Why do you want to re-submit it?
> > > >
> > > > Why not just parse it in the same page?
> > > >
> > > > If not that, then use sessions and set the information, do a
> meta-
> > > refresh
> > > > to redirect to the processing page, then use the processing page
> to
> > > pull the
> > > > session information and make sure it came from the correct page.
> > > >
> > > > HTH,
> > > > Wolf
> > > >
> > >
> > > Hmm good question on why I am re-submitting to a new page.
> Honestly,
> > I
> > > have
> > > no good answer for that other than I have been rushing this part
of
> > the
> > > system for two days to get it done.
> > >
> > > I didn't think of Sessions, that's actually not a bad idea at all.
> I
> > > am
> > > going to re-think the re-submitting thing, and if I stick with it,
> > I'll
> > > give
> > > our session idea a shot.
> >
> > I think what Wolf was getting at is... if the data you're scrubbing
> is
> > being re-submitted to the same page, why re-submit it at all? Why
not
> > just scrub it and then do whatever it is you want to do with it
> instead
> > of putting an extra step in-between?
> >
> > I see your model like this:
> > 1.) Get POST data
> > 2.) Scrub POST data
> > 3.) Re-submit POST data
> > 4.) Deal with POST data
> >
> > Whereas I'm getting at this:
> > 1.) Get POST data
> > 2.) Scrub POST data
> > 3.) Deal with POST data
> >
> >
> > Todd Boyd
> > Web Programmer
> >
> >
> >
> >
> I'm actually not posting back to the same page, I was posting to a
> different
> one.  Which still, when he mentioned it, it didn't make sense why I am
> doing
> that.  I am in agreement with you and Wolf.  I should just scrub it
and
> deal
> with it, not re-submit it off to another place.

On a side note... in the future, if you find that a particular process
calls for POSTing to a different page, the cURL library (which I believe
is now included with PHP by default in v5.x+) can accomplish a plethora
of wonderful stuff that would ordinarily be handled by a browser
(POSTing, basic HTTP authentication, SSL certs, etc.).


Todd Boyd
Web Programmer




--- End Message ---
--- Begin Message ---
On Fri, Sep 5, 2008 at 9:20 AM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:

> On a side note... in the future, if you find that a particular process
> calls for POSTing to a different page, the cURL library (which I believe
> is now included with PHP by default in v5.x+) can accomplish a plethora
> of wonderful stuff that would ordinarily be handled by a browser
> (POSTing, basic HTTP authentication, SSL certs, etc.).

correct: curl is king for that

OP: sending POST to the browser doesn't do anything. POST is a
request, not a response.

if you want to re-post data you need to look at a client-side
alternative using javascript (or applets - flash, java, etc)

--- End Message ---
--- Begin Message --- POST requests in Ajax (or without in js) is straight forward. On the iPod now but I'll POST an example later. Get it?

Luke Slater
Lead Developer
NuVoo

On 5 Sep 2008, at 18:14, mike <[EMAIL PROTECTED]> wrote:

On Fri, Sep 5, 2008 at 9:20 AM, Boyd, Todd M. <[EMAIL PROTECTED]> wrote:

On a side note... in the future, if you find that a particular process calls for POSTing to a different page, the cURL library (which I believe is now included with PHP by default in v5.x+) can accomplish a plethora
of wonderful stuff that would ordinarily be handled by a browser
(POSTing, basic HTTP authentication, SSL certs, etc.).

correct: curl is king for that

OP: sending POST to the browser doesn't do anything. POST is a
request, not a response.

if you want to re-post data you need to look at a client-side
alternative using javascript (or applets - flash, java, etc)

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


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

I need to create a cron job PHP script to access every day the information
of a webpage that is out of my server. This webpage needs POST variables to
display the information.

How can i send this POST variables from my PHP script without having a html
form, and receive the required information?

Thanks,

RB

--- End Message ---

Reply via email to