Answer the question
In order to leave comments, you need to log in
How to compare a link with a benchmark?
Good afternoon.
There are two variables: one is the link specified by default on the server.
The second is the link received from the post request.
How can I compare them (do I need the domain name to match)?
$a = $_POST['link'];
$b = 'domain.com';
Answer the question
In order to leave comments, you need to log in
$url = 'https://google.com';
var_dump(parse_url($url, PHP_URL_HOST));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question