Skip to content

Instantly share code, notes, and snippets.



Last active Nov 5, 2016
What would you like to do?
PHP: Check if a URL does not contain "http://" or "https://"
if ( ( strpos( $url, 'http://' ) === false ) && ( strpos( $url, 'https://' ) === false ) ) {
$url = 'http://' . $url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.