astralaaron Posted February 18, 2010 Share Posted February 18, 2010 is it possible to use the ini_set function to allow include's from remote servers?I am trying to figure out which option it is, and how to write it.thanks in advance ! Link to comment Share on other sites More sharing options...
astralaaron Posted February 18, 2010 Author Share Posted February 18, 2010 url file-access is disabled in the server configurationwhich setting is that refering to? Link to comment Share on other sites More sharing options...
astralaaron Posted February 18, 2010 Author Share Posted February 18, 2010 I tried placing these two at the top:ini_set('allow_url_include',1);ini_set('allow_url_fopen', 1);with no luck, any suggestions? Link to comment Share on other sites More sharing options...
Synook Posted February 18, 2010 Share Posted February 18, 2010 Why not just use file_get_contents() (or if even that fails, a library like cURL) - you will never be able to include files in the normal sense from remote servers. Link to comment Share on other sites More sharing options...
astralaaron Posted February 18, 2010 Author Share Posted February 18, 2010 Why not just use file_get_contents() (or if even that fails, a library like cURL) - you will never be able to include files in the normal sense from remote servers.its for a personal program that runs php from a text file on a different website.. sounds stupid, but will file_get_contents work the same way as include? Link to comment Share on other sites More sharing options...
astralaaron Posted February 18, 2010 Author Share Posted February 18, 2010 Warning: file_get_contents(): URL file-access is disabled in the server configurationdo you know of a cURL tutorial? Link to comment Share on other sites More sharing options...
Synook Posted February 19, 2010 Share Posted February 19, 2010 You can cURL the text file, then eval() it. Note that this is horrible, security-wise, and I'm sure there is a better way to accomplish what you want to do.http://www.php.net/manual/en/book.curl.php Link to comment Share on other sites More sharing options...
astralaaron Posted February 20, 2010 Author Share Posted February 20, 2010 You can cURL the text file, then eval() it. Note that this is horrible, security-wise, and I'm sure there is a better way to accomplish what you want to do.http://www.php.net/manual/en/book.curl.php I realize there is security issues, but that is ok for this specific program...I have one more question, do you have to install the cURL library on most web hosts like godaddy? or do they normally come equipped? Link to comment Share on other sites More sharing options...
boen_robot Posted February 20, 2010 Share Posted February 20, 2010 I realize there is security issues, but that is ok for this specific program...I have one more question, do you have to install the cURL library on most web hosts like godaddy? or do they normally come equipped?Create a new php file, and in it, place:<?php phpinfo() ?> Then execute that file. You should see your PHP version, and all enabled extensions, with their settings and everything. If an extension is not there, it needs to be installed and/or enabled by the host. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.