-
Notifications
You must be signed in to change notification settings - Fork 40
/
curl-getinfo.xml
807 lines (794 loc) · 24.8 KB
/
curl-getinfo.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8b3f89ed6171cb711b00afb0fcacbea3462537b9 Maintainer: jaenecke Status: ready -->
<!-- Reviewed: yes -->
<!-- Rev-Revision: f9c4a68ef4f89e51e6d9b905ad3ddb6492386dd3 Reviewer: samesch -->
<refentry xml:id="function.curl-getinfo" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>curl_getinfo</refname>
<refpurpose>Ruft Informationen zu einem bestimmten Transfer ab</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>curl_getinfo</methodname>
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>option</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Gibt Informationen über den letzen Transfer zurück.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&curl.ch.description;
<varlistentry>
<term><parameter>option</parameter></term>
<listitem>
<para>
Dies kann eine der folgenden Konstanten sein:
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry valign="top">Option</entry>
<entry valign="top">&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry><constant>CURLINFO_CAINFO</constant></entry>
<entry>
Der standardmäßige interne Pfad zur CA-Zertifikatsdatei
</entry>
</row>
<row>
<entry><constant>CURLINFO_CAPATH</constant></entry>
<entry>
Der standardmäßige interne Pfad zum CA-Verzeichnis
</entry>
</row>
<row>
<entry><constant>CURLINFO_EFFECTIVE_URL</constant></entry>
<entry>
Die letzte erfolgreiche URL
</entry>
</row>
<row>
<entry><constant>CURLINFO_HTTP_CODE</constant></entry>
<entry>
Der letzte Antwortcode. Von cURL 7.10.8 an ist dies ein veralteter
Alias von CURLINFO_RESPONSE_CODE
</entry>
</row>
<row>
<entry><constant>CURLINFO_FILETIME</constant></entry>
<entry>
Die (Server-) Zeit der letzten Änderung des abgerufenen Dokuments,
wenn die Option CURLOPT_FILETIME aktiviert ist; wenn -1
zurückgegeben wird, ist die Zeit unbekannt
</entry>
</row>
<row>
<entry><constant>CURLINFO_TOTAL_TIME</constant></entry>
<entry>
Die Gesamtdauer des letzten Transfers in Sekunden
</entry>
</row>
<row>
<entry><constant>CURLINFO_NAMELOOKUP_TIME</constant></entry>
<entry>
Die Zeit in Sekunden, bis die Auflösung des Hostnamens
abgeschlossen war.
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONNECT_TIME</constant></entry>
<entry>
Die Dauer des Verbindungsaufbaus in Sekunden
</entry>
</row>
<row>
<entry><constant>CURLINFO_PRETRANSFER_TIME</constant></entry>
<entry>
Die Zeit in Sekunden zwischen dem Start und dem eigentlichen
Beginn des Empfangs
</entry>
</row>
<row>
<entry><constant>CURLINFO_STARTTRANSFER_TIME</constant></entry>
<entry>
Die Zeit in Sekunden bis zur Übertragung des ersten Bytes
</entry>
</row>
<row>
<entry><constant>CURLINFO_REDIRECT_COUNT</constant></entry>
<entry>
Die Anzahl der Weiterleitungen, wenn die Option
CURLOPT_FOLLOWLOCATION aktiviert ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_REDIRECT_TIME</constant></entry>
<entry>
Die Zeit in Sekunden, die von allen Weiterleitungsschritten
beansprucht wird, bevor der eigentliche Transfer beginnt, wenn die
Option CURLOPT_FOLLOWLOCATION aktiviert ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_REDIRECT_URL</constant></entry>
<entry>
Bei deaktivierter CURLOPT_FOLLOWLOCATION-Option: die
Weiterleitungs-URL, die in der letzten Transaktion gefunden wurde
und als nächstes manuell angefordert werden sollte. Bei
aktivierter CURLOPT_FOLLOWLOCATION-Option ist dies immer leer. Die
Weiterleitungs-URL ist in diesem Fall in CURLINFO_EFFECTIVE_URL
verfügbar
</entry>
</row>
<row>
<entry><constant>CURLINFO_PRIMARY_IP</constant></entry>
<entry>
Die IP-Adresse der jüngsten Verbindung
</entry>
</row>
<row>
<entry><constant>CURLINFO_PRIMARY_PORT</constant></entry>
<entry>
Der Ziel-Port der jüngsten Verbindung
</entry>
</row>
<row>
<entry><constant>CURLINFO_LOCAL_IP</constant></entry>
<entry>
Die lokale (Quell-) IP-Adresse der jüngsten Verbindung
</entry>
</row>
<row>
<entry><constant>CURLINFO_LOCAL_PORT</constant></entry>
<entry>
Der lokale (Quell-) Port der jüngsten Verbindung
</entry>
</row>
<row>
<entry><constant>CURLINFO_SIZE_UPLOAD</constant></entry>
<entry>
Die Anzahl der gesendeten Bytes
</entry>
</row>
<row>
<entry><constant>CURLINFO_SIZE_DOWNLOAD</constant></entry>
<entry>
Die Anzahl der empfangenen Bytes
</entry>
</row>
<row>
<entry><constant>CURLINFO_SPEED_DOWNLOAD</constant></entry>
<entry>
Die durchschnittliche Download-Geschwindigkeit
</entry>
</row>
<row>
<entry><constant>CURLINFO_SPEED_UPLOAD</constant></entry>
<entry>
Die durchschnittliche Upload-Geschwindigkeit
</entry>
</row>
<row>
<entry><constant>CURLINFO_HEADER_SIZE</constant></entry>
<entry>
Die Gesamtgröße aller empfangenen Header
</entry>
</row>
<row>
<entry><constant>CURLINFO_HEADER_OUT</constant></entry>
<entry>
Die gesendete Anfrage. Damit dies funktioniert, muss die Option
CURLINFO_HEADER_OUT durch Aufruf von curl_setopt() zum Handle
hinzugefügt werden
</entry>
</row>
<row>
<entry><constant>CURLINFO_REFERER</constant></entry>
<entry>
Der Referrer-Header
</entry>
</row>
<row>
<entry><constant>CURLINFO_REQUEST_SIZE</constant></entry>
<entry>
Die Gesamtgröße aller Anfragen; momentan nur für HTTP verfügbar
</entry>
</row>
<row>
<entry><constant>CURLINFO_RETRY_AFTER</constant></entry>
<entry>
Die Information aus dem Retry-After:-Header oder Null, wenn es
keinen gültigen Header gibt.
</entry>
</row>
<row>
<entry><constant>CURLINFO_SSL_VERIFYRESULT</constant></entry>
<entry>
Das Ergebnis der Überprüfung des SSL-Zertifikats, angefordert
durch das Setzen von CURLOPT_SSL_VERIFYPEER
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONTENT_LENGTH_DOWNLOAD</constant></entry>
<entry>
Die Größe des Downloads, ermittelt aus dem Content-Length:-Header
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONTENT_LENGTH_UPLOAD</constant></entry>
<entry>
Die festgesetzte Größe des Uploads
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONTENT_TYPE</constant></entry>
<entry>
Der Content-Type: des angeforderten Dokuments. NULL zeigt an, dass
der Server keinen gültigen Content-Type:-Header gesendet hat
</entry>
</row>
<row>
<entry><constant>CURLINFO_PRIVATE</constant></entry>
<entry>
Private Daten, die zu diesem cURL-Handle gehören und zuvor mit der
Option CURLOPT_PRIVATE der Funktion curl_setopt() gesetzt wurden
</entry>
</row>
<row>
<entry><constant>CURLINFO_PROXY_ERROR</constant></entry>
<entry>
Der detaillierte (SOCKS) Proxy-Fehlercode, wenn bei der letzten
Übertragung ein CURLE_PROXY-Fehler aufgetreten ist. Der
zurückgegebene Wert ist genau einer der CURLPX_*-Werte. Wenn kein
Antwortcode verfügbar ist, lautet der Fehlercode CURLPX_OK.
</entry>
</row>
<row>
<entry><constant>CURLINFO_RESPONSE_CODE</constant></entry>
<entry>
Der letzte Antwortcode
</entry>
</row>
<row>
<entry><constant>CURLINFO_HTTP_CONNECTCODE</constant></entry>
<entry>
Der CONNECT-Antwortcode
</entry>
</row>
<row>
<entry><constant>CURLINFO_HTTPAUTH_AVAIL</constant></entry>
<entry>
Eine Bitmaske, die die verfügbaren Authentifizierungsmethode(n)
gemäß der vorherigen Antwort anzeigt
</entry>
</row>
<row>
<entry><constant>CURLINFO_PROXYAUTH_AVAIL</constant></entry>
<entry>
Eine Bitmaske, die die verfügbaren Proxy-Authentifikationsmethode(n)
gemäß der vorherigen Antwort anzeigt
</entry>
</row>
<row>
<entry><constant>CURLINFO_OS_ERRNO</constant></entry>
<entry>
Die Fehlernummer (Errno) eines Verbindungsfehlers. Die Zahl ist
OS- und systemabhängig.
</entry>
</row>
<row>
<entry><constant>CURLINFO_NUM_CONNECTS</constant></entry>
<entry>
Die Anzahl der Verbindungen, die cURL erzeugen musste, um die
vorherige Übertragung durchzuführen
</entry>
</row>
<row>
<entry><constant>CURLINFO_SSL_ENGINES</constant></entry>
<entry>
Die unterstützten OpenSSL-Crypto-Engines
</entry>
</row>
<row>
<entry><constant>CURLINFO_COOKIELIST</constant></entry>
<entry>
Alle bekannten Cookies
</entry>
</row>
<row>
<entry><constant>CURLINFO_FTP_ENTRY_PATH</constant></entry>
<entry>
Der Entry-Pfad des FTP-Servers
</entry>
</row>
<row>
<entry><constant>CURLINFO_APPCONNECT_TIME</constant></entry>
<entry>
Die Zeitdauer in Sekunden, die bis zum
SSL/SSH-Verbindungsaufbau/Handshake zum entfernten Server
verstrichen ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_CERTINFO</constant></entry>
<entry>
Die TLS-Zertifikatskette
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONDITION_UNMET</constant></entry>
<entry>
Die Info über eine nicht eingehaltene Zeitbedingung
</entry>
</row>
<row>
<entry><constant>CURLINFO_RTSP_CLIENT_CSEQ</constant></entry>
<entry>
Die nächste CSeq des RTSP-Clients
</entry>
</row>
<row>
<entry><constant>CURLINFO_RTSP_CSEQ_RECV</constant></entry>
<entry>
Die zuletzt empfangene CSeq
</entry>
</row>
<row>
<entry><constant>CURLINFO_RTSP_SERVER_CSEQ</constant></entry>
<entry>
Die nächste CSeq des RTSP-Servers
</entry>
</row>
<row>
<entry><constant>CURLINFO_RTSP_SESSION_ID</constant></entry>
<entry>
Die RTSP-Session-ID
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONTENT_LENGTH_DOWNLOAD_T</constant></entry>
<entry>
Die inhaltliche Länge des Downloads. Das ist der Wert, der aus dem
Content-Length:-Feld gelesen wurde. -1, wenn die Größe nicht
bekannt ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONTENT_LENGTH_UPLOAD_T</constant></entry>
<entry>
Die angegebene Größe des Uploads. -1, wenn die Größe nicht bekannt
ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_HTTP_VERSION</constant></entry>
<entry>
Die Version, die in der letzten HTTP-Verbindung verwendet wurde.
Der Rückgabewert ist eine der definierten
CURL_HTTP_VERSION_*-Konstanten oder 0, wenn die Version nicht
ermittelt werden kann
</entry>
</row>
<row>
<entry><constant>CURLINFO_PROTOCOL</constant></entry>
<entry>
Das Protokoll, das in der letzten HTTP-Verbindung verwendet wurde.
Der Rückgabewert ist genau einer der CURLPROTO_*-Werte
</entry>
</row>
<row>
<entry><constant>CURLINFO_PROXY_SSL_VERIFYRESULT</constant></entry>
<entry>
Das Ergebnis der Zertifikatsprüfung, die angefordert wurde (durch
Verwendung der Option CURLOPT_PROXY_SSL_VERIFYPEER). Wird nur für
HTTPS-Proxies verwendet
</entry>
</row>
<row>
<entry><constant>CURLINFO_SCHEME</constant></entry>
<entry>
Das URL-Schema, das für die jüngste Verbindung verwendet wurde
</entry>
</row>
<row>
<entry><constant>CURLINFO_SIZE_DOWNLOAD_T</constant></entry>
<entry>
Die Gesamtanzahl von Bytes, die heruntergeladen wurden. Die Anzahl
betrifft nur die letzte Übertragung, und wird für jede neue
Übertragung zurückgesetzt
</entry>
</row>
<row>
<entry><constant>CURLINFO_SIZE_UPLOAD_T</constant></entry>
<entry>
Die Gesamtanzahl von Bytes, die hochgeladen wurden
</entry>
</row>
<row>
<entry><constant>CURLINFO_SPEED_DOWNLOAD_T</constant></entry>
<entry>
Die durchschnittliche Download-Geschwindigkeit in Bytes pro
Sekunde, die CURL für den vollständigen Download gemessen hat
</entry>
</row>
<row>
<entry><constant>CURLINFO_SPEED_UPLOAD_T</constant></entry>
<entry>
Die durchschnittliche Upload-Geschwindigkeit in Bytes pro Sekunde,
die CURL für den vollständigen Upload gemessen hat
</entry>
</row>
<row>
<entry><constant>CURLINFO_APPCONNECT_TIME_T</constant></entry>
<entry>
Die Zeit in Mikrosekunden, die vom Beginn bis zur Vollendung der
SSL/SSH-Verbindung/des Handshakes zum Remote-Host vergangen ist
</entry>
</row>
<row>
<entry><constant>CURLINFO_CONNECT_TIME_T</constant></entry>
<entry>
Die Gesamtdauer in Mikrosekunden, vom Beginn bis zur Vollendung
der Verbindung zum Remote-Host (oder Proxy)
</entry>
</row>
<row>
<entry><constant>CURLINFO_FILETIME_T</constant></entry>
<entry>
Die letzte Änderung des abgerufenen Dokuments (als
Unix-Zeitstempel); eine Alternative zu CURLINFO_FILETIME, die es
Systemen mit 32-Bit-Ganzzahlvariablen ermöglicht, Daten außerhalb
des 32-Bit-Zeitstempelbereichs zu extrahieren
</entry>
</row>
<row>
<entry><constant>CURLINFO_NAMELOOKUP_TIME_T</constant></entry>
<entry>
Die Dauer in Mikrosekunden vom Beginn bis zur Vervollständigung
der Namensauflösung
</entry>
</row>
<row>
<entry><constant>CURLINFO_PRETRANSFER_TIME_T</constant></entry>
<entry>
Die benötigte Zeit vom Beginn bis zum eigentlichen Beginn der
Dateiübertragung in Mikrosekunden
</entry>
</row>
<row>
<entry><constant>CURLINFO_REDIRECT_TIME_T</constant></entry>
<entry>
Die Gesamtdauer in Mikrosekunden für alle Weiterleitungsschritte
einschließlich Namenslookup, Verbindung, Vorübertragung und
Übertragung, bis zum Beginn der eigentlichen Transaktion
</entry>
</row>
<row>
<entry><constant>CURLINFO_STARTTRANSFER_TIME_T</constant></entry>
<entry>
Die benötigte Zeit in Mikrosekunden vom Beginn bis zum Empfang des
ersten Bytes
</entry>
</row>
<row>
<entry><constant>CURLINFO_TOTAL_TIME_T</constant></entry>
<entry>
Die Gesamtdauer in Mikrosekunden für die vorhergehende Übertragung
einschließlich Namensauflösung, TCP-Verbindung usw.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Wird der Parameter <parameter>option</parameter> angegeben, wird der
entsprechende Wert zurückgegeben. Andernfalls liefert die Funktion ein
assoziatives Array mit den folgenden Elementen zurück (analog zum Parameter
<parameter>option</parameter>), oder &false; im Fehlerfall:
<itemizedlist>
<listitem>
<simpara>
"url"
</simpara>
</listitem>
<listitem>
<simpara>
"content_type"
</simpara>
</listitem>
<listitem>
<simpara>
"http_code"
</simpara>
</listitem>
<listitem>
<simpara>
"header_size"
</simpara>
</listitem>
<listitem>
<simpara>
"request_size"
</simpara>
</listitem>
<listitem>
<simpara>
"filetime"
</simpara>
</listitem>
<listitem>
<simpara>
"ssl_verify_result"
</simpara>
</listitem>
<listitem>
<simpara>
"redirect_count"
</simpara>
</listitem>
<listitem>
<simpara>
"total_time"
</simpara>
</listitem>
<listitem>
<simpara>
"namelookup_time"
</simpara>
</listitem>
<listitem>
<simpara>
"connect_time"
</simpara>
</listitem>
<listitem>
<simpara>
"pretransfer_time"
</simpara>
</listitem>
<listitem>
<simpara>
"size_upload"
</simpara>
</listitem>
<listitem>
<simpara>
"size_download"
</simpara>
</listitem>
<listitem>
<simpara>
"speed_download"
</simpara>
</listitem>
<listitem>
<simpara>
"speed_upload"
</simpara>
</listitem>
<listitem>
<simpara>
"download_content_length"
</simpara>
</listitem>
<listitem>
<simpara>
"upload_content_length"
</simpara>
</listitem>
<listitem>
<simpara>
"starttransfer_time"
</simpara>
</listitem>
<listitem>
<simpara>
"redirect_time"
</simpara>
</listitem>
<listitem>
<simpara>
"certinfo"
</simpara>
</listitem>
<listitem>
<simpara>
"primary_ip"
</simpara>
</listitem>
<listitem>
<simpara>
"primary_port"
</simpara>
</listitem>
<listitem>
<simpara>
"local_ip"
</simpara>
</listitem>
<listitem>
<simpara>
"local_port"
</simpara>
</listitem>
<listitem>
<simpara>
"redirect_url"
</simpara>
</listitem>
<listitem>
<simpara>
"request_header" (Dies ist nur gesetzt, wenn die Option
<constant>CURLINFO_HEADER_OUT</constant> durch einen vorherigen Aufruf
von <function>curl_setopt</function> gesetzt wurde)
</simpara>
</listitem>
</itemizedlist>
Es ist zu beachten, dass private Daten nicht im assoziativen Array
enthalten sind, sondern individuell mit der Option
<constant>CURLINFO_PRIVATE</constant> abgerufen werden müssen.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
<constant>CURLINFO_CAINFO</constant>
und <constant>CURLINFO_CAPATH</constant> eingeführt.
</entry>
</row>
<row>
<entry>8.2.0</entry>
<entry>
<constant>CURLINFO_PROXY_ERROR</constant>,
<constant>CURLINFO_REFERER</constant>,
<constant>CURLINFO_RETRY_AFTER</constant> eingeführt.
</entry>
</row>
&curl.changelog.handle-param;
<row>
<entry>8.0.0</entry>
<entry>
<parameter>option</parameter> ist jetzt nullable (akzeptiert den
&null;-Wert); vorher war der Vorgabewert <literal>0</literal>.
</entry>
</row>
<row>
<entry>7.3.0</entry>
<entry>
<constant>CURLINFO_CONTENT_LENGTH_DOWNLOAD_T</constant>,
<constant>CURLINFO_CONTENT_LENGTH_UPLOAD_T</constant>,
<constant>CURLINFO_HTTP_VERSION</constant>,
<constant>CURLINFO_PROTOCOL</constant>,
<constant>CURLINFO_PROXY_SSL_VERIFYRESULT</constant>,
<constant>CURLINFO_SCHEME</constant>,
<constant>CURLINFO_SIZE_DOWNLOAD_T</constant>,
<constant>CURLINFO_SIZE_UPLOAD_T</constant>,
<constant>CURLINFO_SPEED_DOWNLOAD_T</constant>,
<constant>CURLINFO_SPEED_UPLOAD_T</constant>,
<constant>CURLINFO_APPCONNECT_TIME_T</constant>,
<constant>CURLINFO_CONNECT_TIME_T</constant>,
<constant>CURLINFO_FILETIME_T</constant>,
<constant>CURLINFO_NAMELOOKUP_TIME_T</constant>,
<constant>CURLINFO_PRETRANSFER_TIME_T</constant>,
<constant>CURLINFO_REDIRECT_TIME_T</constant>,
<constant>CURLINFO_STARTTRANSFER_TIME_T</constant>,
<constant>CURLINFO_TOTAL_TIME_T</constant> eingeführt.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>curl_getinfo</function>-Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
// Eine cURL-Ressource erstellen
$ch = curl_init('http://www.example.com/');
// ausführen
curl_exec($ch);
// prüfen, ob ein Fehler aufgetreten ist
if (!curl_errno($ch)) {
$info = curl_getinfo($ch);
echo 'Es wurden ', $info['total_time'], ' Sekunden benötigt für eine Anfrage an ', $info['url'], "\n";
}
// Ressource schliessen
curl_close($ch);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>curl_getinfo</function>-Beispiel mit dem Parameter <parameter>option</parameter></title>
<programlisting role="php">
<![CDATA[
<?php
// Eine cURL-Ressource erstellen
$ch = curl_init('http://www.example.com/');
// ausführen
curl_exec($ch);
// HTTP-Status-Code prüfen
if (!curl_errno($ch)) {
switch ($http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE)) {
case 200: # OK
break;
default:
echo 'Unerwarteter HTTP-Code: ', $http_code, "\n";
}
}
// Ressource schliessen
curl_close($ch);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
Informationen, die mit dieser Funktion gesammelt wurden, bleiben erhalten,
wenn das Handle wiederverwendet wird. Das bedeutet, dass außer wenn eine
Statistik intern von dieser Funktion überschrieben wird, die vorherige Info
zurückgegeben wird.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->