I am getting an image link from an HTML GET request like this...

```
www.example.com?image=www.anotherdomain.com/image.jpg

if (isset($_GET['image'])) {
    echo $_GET['image'];
}

```

How can I ensure that the image URL that is passed comes from www.anotherdomain.com

Should I parse the URL and check that way?