Hi frnds, I have a problem accessing pages from some remote sites. is there any way to do the same. i will be highly thankful.....if somebody helps me sort out this matter thanks in advance whitedust
You don't state whether it is the coding that you want, to be able to acheive your goal, or whether you know that but it doesn't work. Code examples or the error messages you are getting would help.
i have two websites on two different servers. i have database on one of the server and i want to access that databse from another server. i have got the file on the server where i have the database. now i want to access the same file feom the anothe website hosted on another server. i included the file using absolute path of the file, but the file is not executing. i specified the following path include("http://www.domainname.com/filename.php"); it is not working please help it is urgent
Hmm, not sure what you're trying to do... But possibly: $page = file_get_contents("http://www.domainname.com/filename.php"); echo $page; PHP:
cURL or anything else won't help if the server is configured not to accept connections to MySQL from outside...
The include function works differently when using remote ( i.e.http://whatever ) paths than when using local paths. If you use a remote path then the script will execute on the remote server, and any variables that you are depending on being set in the script will not be available to you on the local machine. Also, any variables set in the local script will not be available to the remote script. If all you want to do is access a remote database, you just need to make sure that the database is ready to accept connections from your local server - e.g. you need a database user "dbuser" at host "myhost.com" ( or 111.222.333.444) set up in your users table. Then you can just connect as normal. (I'm assuming that you're using MySQL. If so you can set the user up through PHPMyAdmin and then just use mysql_connect() as normal. )