Jump to content

Get data from a different domain...


clonetrooper9494
 Share

Recommended Posts

depending on your server, it is possible to get it with the file() function. Don't know about the include function, but i don't believe so. the file() thing will only work(i believe) if the PHP fsock option is enabled.

Link to comment
Share on other sites

Yes, you can, include does work if allow_url_fopen is set to true - but it comes with a serious security risk since with include whatever you get back will be interpreted as PHP and run on your server. Thus, if they can modify the URL, or can change the contents of the remote file to include PHP they can execute arbitrary code on your server.So, file(), file_get_contents() and similar are better choices, since they do not carry this risk.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...