<HTML ><HEAD ><TITLE >curl_getinfo</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="CURL, Client URL Library Functions" HREF="ref.curl.html"><LINK REL="PREVIOUS" TITLE="curl_exec" HREF="function.curl-exec.html"><LINK REL="NEXT" TITLE="curl_init" HREF="function.curl-init.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.curl-exec.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.curl-init.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.curl-getinfo" ></A >curl_getinfo</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN14772" ></A ><P > (PHP 4 >= 4.0.4)</P >curl_getinfo -- Get information regarding a specific transfer </DIV ><DIV CLASS="refsect1" ><A NAME="AEN14775" ></A ><H2 >Description</H2 >string <B CLASS="methodname" >curl_getinfo</B > ( resource ch [, int opt])<BR ></BR ><P > Returns information about the last transfer, <TT CLASS="parameter" ><I >opt</I ></TT > may be one of the following: <P ></P ><UL ><LI ><P > "CURLINFO_EFFECTIVE_URL" - Last effective URL </P ></LI ><LI ><P > "CURLINFO_HTTP_CODE" - Last received HTTP code </P ></LI ><LI ><P > "CURLINFO_FILETIME" - Remote time of the retrieved document, if -1 is returned the time of the document is unknown </P ></LI ><LI ><P > "CURLINFO_TOTAL_TIME" - Total transaction time in seconds for last transfer </P ></LI ><LI ><P > "CURLINFO_NAMELOOKUP_TIME" - Time in seconds until name resolving was complete </P ></LI ><LI ><P > "CURLINFO_CONNECT_TIME" - Time in seconds it took to establish the connection </P ></LI ><LI ><P > "CURLINFO_PRETRANSFER_TIME" - Time in seconds from start until just before file transfer begins </P ></LI ><LI ><P > "CURLINFO_STARTTRANSFER_TIME" - Time in seconds until the first byte is about to be transfered </P ></LI ><LI ><P > "CURLINFO_REDIRECT_TIME" - Time in seconds of all redirection steps before final transaction was started </P ></LI ><LI ><P > "CURLINFO_SIZE_UPLOAD" - Total number of bytes uploaded </P ></LI ><LI ><P > "CURLINFO_SIZE_DOWNLOAD" - Total number of bytes downloaded </P ></LI ><LI ><P > "CURLINFO_SPEED_DOWNLOAD" - Average download speed </P ></LI ><LI ><P > "CURLINFO_SPEED_UPLOAD" - Average upload speed </P ></LI ><LI ><P > "CURLINFO_HEADER_SIZE" - Total size of all headers received </P ></LI ><LI ><P > "CURLINFO_REQUEST_SIZE" - Total size of issued requests, currently only for HTTP requests </P ></LI ><LI ><P > "CURLINFO_SSL_VERIFYRESULT" - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER </P ></LI ><LI ><P > "CURLINFO_CONTENT_LENGTH_DOWNLOAD" - content-length of download, read from Content-Length: field </P ></LI ><LI ><P > "CURLINFO_CONTENT_LENGTH_UPLOAD" - Specified size of upload </P ></LI ><LI ><P > "CURLINFO_CONTENT_TYPE" - Content-type of downloaded object, NULL indicates server did not send valid Content-Type: header </P ></LI ></UL > </P ><P > If called without the optional parameter opt an assoctive array is returned with the following array elements which correspond to <TT CLASS="parameter" ><I >opt</I ></TT > options: <P ></P ><UL ><LI ><P > "url" </P ></LI ><LI ><P > "content_type" </P ></LI ><LI ><P > "http_encode" </P ></LI ><LI ><P > "header_size" </P ></LI ><LI ><P > "request_size" </P ></LI ><LI ><P > "filetime" </P ></LI ><LI ><P > "ssl_verify_result" </P ></LI ><LI ><P > "redirect_count" </P ></LI ><LI ><P > "total_time" </P ></LI ><LI ><P > "namelookup_time" </P ></LI ><LI ><P > "connect_time" </P ></LI ><LI ><P > "pretransfer_time" </P ></LI ><LI ><P > "size_upload" </P ></LI ><LI ><P > "size_download" </P ></LI ><LI ><P > "speed_download" </P ></LI ><LI ><P > "speed_upload" </P ></LI ><LI ><P > "download_content_length" </P ></LI ><LI ><P > "upload_content_length" </P ></LI ><LI ><P > "starttransfer_time" </P ></LI ><LI ><P > "redirect_time" </P ></LI ></UL > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.curl-exec.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.curl-init.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >curl_exec</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.curl.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >curl_init</TD ></TR ></TABLE ></DIV ></BODY ></HTML >