I'm trying to use file_get_contents () to grab only the name from the fake name generator site ( https://fakena.me/fake-name/ ), however I get the following warning:
file_get_contents() stream does not support seeking
I do not need all the content on the page. I only need the "Name" section on this site: https://fakena.me/fake-name/ .
My code is:
$name= file_get_contents('https://fakena.me/fake-name/', NULL, NULL, 849, 32);
It works well in the local host, showing an error only on the website.
source share