| @@ 315-323 (lines=9) @@ | ||
| 312 | * @param string $url |
|
| 313 | * @return string |
|
| 314 | */ |
|
| 315 | public static function removeProtocolFromUrl($url) { |
|
| 316 | if (strpos($url, 'https://') === 0) { |
|
| 317 | return substr($url, strlen('https://')); |
|
| 318 | } else if (strpos($url, 'http://') === 0) { |
|
| 319 | return substr($url, strlen('http://')); |
|
| 320 | } |
|
| 321 | ||
| 322 | return $url; |
|
| 323 | } |
|
| 324 | ||
| 325 | } |
|
| 326 | ||
| @@ 2536-2544 (lines=9) @@ | ||
| 2533 | * @param string $url |
|
| 2534 | * @return string |
|
| 2535 | */ |
|
| 2536 | public static function removeProtocolFromUrl($url) { |
|
| 2537 | if (strpos($url, 'https://') === 0) { |
|
| 2538 | return substr($url, strlen('https://')); |
|
| 2539 | } else if (strpos($url, 'http://') === 0) { |
|
| 2540 | return substr($url, strlen('http://')); |
|
| 2541 | } |
|
| 2542 | ||
| 2543 | return $url; |
|
| 2544 | } |
|
| 2545 | ||
| 2546 | /** |
|
| 2547 | * try http post first with https and then with http as a fallback |
|