When I try to do a file(‘http://somewebsite.com‘) i get an error
‘URL file-access is disabled in the server configuration’
I tried using ini_set(‘allow_url_fopen’, ‘On’); but that didn’t work.
I’m using shared hosting. Any suggestions?
All I want to do is read the html source code of a website.
On php version>4.3.4 and <6, you can’t set
allow_url_fopenin your script. Try using curl instead.