Lines Matching refs:parts
50 $parts = parse_url($url);
55 if (!array_key_exists('port', $parts)) {
57 if ($parts['scheme'] == 'http') {
58 $parts['port'] = 80;
59 } elseif ($parts['scheme'] == 'https') {
60 $parts['port'] = 443;
66 if (!array_key_exists('path', $parts)) {
67 $parts['path'] = '/';
70 $host = $parts['host'];
72 if ($parts['scheme'] == 'https') {
79 "GET ".$parts['path'].
80 (array_key_exists('query', $parts) ?
81 "?".$parts['query'] : "").
84 "Host: ".$parts['host'].
85 ($specify_port ? ":".$parts['port'] : ""),
86 "Port: ".$parts['port']);
97 @$sock = fsockopen($host, $parts['port'], $errno, $errstr,
138 $parts = explode(": ", $header, 2);
140 if (count($parts) == 2) {
141 list($name, $value) = $parts;
157 $parts = parse_url($url);
161 $post_path = $parts['path'];
162 if (isset($parts['query'])) {
163 $post_path .= '?' . $parts['query'];
167 $headers[] = "Host: " . $parts['host'];
183 if (!array_key_exists('port', $parts)) {
184 if ($parts['scheme'] == 'http') {
185 $parts['port'] = 80;
186 } elseif ($parts['scheme'] == 'https') {
187 $parts['port'] = 443;
193 if ($parts['scheme'] == 'https') {
194 $parts['host'] = sprintf("ssl://%s", $parts['host']);
201 $sock = fsockopen($parts['host'], $parts['port'], $errno, $errstr,