Lines Matching refs:parts
58 $parts = parse_url($url);
63 if (!array_key_exists('port', $parts)) {
65 if ($parts['scheme'] == 'http') {
66 $parts['port'] = 80;
67 } elseif ($parts['scheme'] == 'https') {
68 $parts['port'] = 443;
74 if (!array_key_exists('path', $parts)) {
75 $parts['path'] = '/';
78 $host = $parts['host'];
80 if ($parts['scheme'] == 'https') {
87 "GET " . $parts['path'] .
88 (array_key_exists('query', $parts) ?
89 "?" . $parts['query'] : "") .
92 "Host: " . $parts['host'] .
93 ($specify_port ? ":" . $parts['port'] : ""),
94 "Port: " . $parts['port'],
106 @$sock = fsockopen($host, $parts['port'], $errno, $errstr,
147 $parts = explode(": ", $header, 2);
149 if (count($parts) == 2) {
150 list($name, $value) = $parts;
166 $parts = parse_url($url);
170 $post_path = $parts['path'];
171 if (isset($parts['query'])) {
172 $post_path .= '?' . $parts['query'];
176 $headers[] = "Host: " . $parts['host'];
192 if (!array_key_exists('port', $parts)) {
193 if ($parts['scheme'] == 'http') {
194 $parts['port'] = 80;
195 } elseif ($parts['scheme'] == 'https') {
196 $parts['port'] = 443;
202 if ($parts['scheme'] == 'https') {
203 $parts['host'] = sprintf("ssl://%s", $parts['host']);
210 $sock = fsockopen($parts['host'], $parts['port'], $errno, $errstr,