Can’t get url_to_postid to work

Probably because you don’t have a colon in the url after https (assuming you copied the $url parameter correctly).

The function will return a ‘0’ if the page does not exist.