Welcome Guest, Not a member yet? Register   Sign In
Help ME. Read file from REMOTE Server

HI first post but have been using Code Igniter for a year now and before I start the question let me just say YOU GUYS ROCK. I can't even imagine a website without Code igniter at the CORE.

OK but the question. I am developing a Hosted CMS that will allow users to create websites and manage them for free and just pay when they want a bigger package (Need to pay my own server costs Big Grin). But now the question the idea from the start was to allow the users to view their website by going to http://mywebsite/website/yourwebsitename and http://yourwebsite.mywebsite.co.za (Proudly South-African). I then build a remote extension which would be accessed by http://mywebsite/website/yourwebsite/remote/URL-ID/. This path will render all menu items according to the URL you registered and then request in the url.

Now comes the problem I build a analytics library which stores a user's info (like browser, OS, country etc.) and their page views). I intended from the start to just build a .php file that would simply read the website from our website so you can use the website on any URL. Now this works fine but when I read remotely the analytics can't be done as I am probably not passing the right header could you please help me I don't know anything about the headers that browsers send to give information.

Thanks, this has been bothering me for quite some time

bump... Anyone Plz?

I don't really understand why you need to access the file remotely, but you could try cURL:

In order to simulate a browser request, you need to send at least the user agent.

then help me with a idea. what can I use if I want a client to be able to access their website on my server from their local or already hosted domain?

the PHP function file_get_contents() has usually worked for me.

Yes it does work but how do i read and display the website while still keeping the sessions and be able to post ?

oh, i see, you have "requirements" ;-)

maybe try an iframe?

You may need to install something like a proxy (check out phproxy).

Theme © iAndrew 2016 - Forum software by © MyBB