SyntaxFix
Write A Post
Hire A Developer
Questions
strlen(url)
Returns the length of the string. It counts all characters until a null-byte is found. In your case, check it against 0.
Or just check it manually with:
*url == '\0'