could somebody please tell me how i would go about including a file from domain a in domain b e.g. i want to load something from domain a in domain b. i have tried php include wih no success thanks
I wonder why this cannot work in DomainB.com site page: <?php include("http://www.domainA.com/yourfile.php");?> Code (markup): Did u try exactly this?
If you can edit or emulate php.ini, change/add: allow_url_include = on It will allow you to include URLs. Peace,
use curl <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.domain.com"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); ?> PHP: replace http://www.domain.com with the file you want to grab.
Please give a small try to: http://myphpsource.blogspot.com/2008/08/php-fget-read-file-line-by-line.html and http://myphpsource.blogspot.com/2008/08/php-files-how-to-read-and-write-to.html
i think bcoz security problem .. we can't include form other domain .. but u can get it with cURL or get_content