Which PHP function should replace file_get_contents() when fetching user-supplied URLs to prevent SSRF (Server-Side Request Forgery)?
-
A
There is no drop-in replacement; input must be validated against an allowlist of permitted hosts
-
B
curl_init() with CURLOPT_FOLLOWLOCATION disabled
-
C
fopen() with the b flag
-
D
stream_get_contents() with a timeout