You are here: Re: sending http requests with curl but closing before reading the response « PHP Programming Language « IT news, forums, messages
Re: sending http requests with curl but closing before reading the response

Posted by Andy Hassall on 07/27/06 19:18

On 27 Jul 2006 00:14:10 -0700, "yawnmoth" <terra1024@yahoo.com> wrote:

>Is it possible to send http requests with curl but not have curl wait
>for the response?
>
>The reason I ask is because I'd like to code a web app that can sorta
>start time consuming processes without the user having to wait. I'm
>doing this (with fsockopen) by sending an http request to a page that
>does the time consuming stuff and then immediatly closing, without
>having read any of the response. This way, I don't have to wait for
>the response.
>
>Is it possible to do the same thing with curl? Sending just HEAD
>requests doesn't work since it'd seem that the response (which I don't
>yet know how to disable, if possible) is only sent at the end of the
>pages execution. This might be a mod_gzip issue, but I'd rather use
>fsockopen then disable mod_gzip.

I suppose you could use CURLOPT_TIMEOUT set to a short timeout?

I'm not sure what the scope of CURLOPT_TIMEOUT is - if it's for the transfer
only, and CURLOPT_CONNECTION_TIMEOUT is specifically for the handshaking, then
it ought to fit your purpose.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация