Forum Moderators: coopster

Message Too Old, No Replies

Replies from CURLOPT POSTFIELDS - possible to remove/cancel/ignore?

How do I block incoming connections to a script? But allow outgoing?

         

rollinj

1:13 am on Sep 21, 2007 (gmt 0)

10+ Year Member



I simply want to make an http POST using CURL but every time I do:

curl_setopt($ch, CURLOPT_POSTFIELDS,$post);

I'm given a response (usually en entire HTML page of whatever form I just submitted)

I know that if the string is posted - it will be accepted by the end server - so I do not need/want to see a response.

I've tried playing around with:

curl_setopt($ch, CURLOPT_TIMEOUT, 1);

AND

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);

changing the values from 0 to 0.01 to 0.1 to 1 etc... with no luck - I'm still seeing a response.

How do I post variables without waiting/seeing the response?

jatar_k

12:44 pm on Sep 23, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



can't you just not worry about the response and carry on? I'm not sure why it matters.

cameraman

5:15 pm on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think what you're after is:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

That will send the response back to the script where you can ignore it instead of to the browser.