curl-users
Help: set ip address from the result into some variable
From: dauz <azudin_at_citranet.com.my>
Date: Wed, 01 Nov 2006 01:00:28 +0800
Date: Wed, 01 Nov 2006 01:00:28 +0800
my domain.com have multiple ip address like 192.168.0.1, 192.168.1.8, 10.1.1.1
* About to connect() to www.mydomain.com port 80
* Trying 192.168.1.8... * connected
* Connected to ww.mydomain.com
(192.168.1.8) port 80
> GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Host: www.mydomain.com
Accept: */*
=====================================
my question is; from the result, how to set my ip address into variable? i have an array for example
$info1 =
Array
(
[url] => http://www.mydomain.com
[content_type] => text/html
[http_code] => 200
[header_size] => 127
[request_size] => 122
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.308163
[namelookup_time] => 0.031447
[connect_time] => 0.052303
[pretransfer_time] => 0.052447
[size_upload] => 0
[size_download] => 21127
[speed_download] => 68557
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0.088098
[redirect_time] => 0
)
$info2 =ipaddress (192.168.1.8) <- refer to the result
Received on 2006-10-31