Posted by Domestos on 10/11/65 11:29
> Sure you could use a regular expression, but perhaps it's more convenient
> to
> try to fetch the content instead:
>
> $url = strpos($url, 'http://') === 0 ? $url : "http://$url";
> if (@file_get_contents($url)) {
> // URL is valid
> }
okay I am pretty new to PHP can you please explain the following...
what do the three '=' signs mean?
what does the '?' mark do?
and what is ' $url : http://$url ' doing?
Navigation:
[Reply to this message]
|