dzhax Posted June 22, 2010 Share Posted June 22, 2010 Ok well currently i am working on a CMS, and i am making it that the person that is using it all they have to host is the main theme files and image files. So to do that i was wondering what would be easier to do if using a java script to send the webpage base URL to a data query that i have set up to see if the CMS has been Verified and if so then it also sends the information that is needed to generate the page back to the main files of which the user would be hosting.If you are a little confused about what i am trying to say then just ask and i will try and explain it in a better way. Link to comment Share on other sites More sharing options...
NurAzije Posted June 22, 2010 Share Posted June 22, 2010 I did not understand everything, but why you do not use sessions? If they are on the same domain? Link to comment Share on other sites More sharing options...
thescientist Posted June 22, 2010 Share Posted June 22, 2010 so who's hosting the content? Are you hosting the content and the customer is merely serving up the images and pages and then making requests to get the content from you? Link to comment Share on other sites More sharing options...
dzhax Posted June 22, 2010 Author Share Posted June 22, 2010 OK well i will be hosting the all of the databases and code, but the user will be hosting the theme files and images. i just need to no what would be easiest to have it grab the information from the database if they are not hosting the database, but i don't want them to be able to have access to my database. Link to comment Share on other sites More sharing options...
thescientist Posted June 22, 2010 Share Posted June 22, 2010 you'll have to look up how to access information across domains. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 22, 2010 Share Posted June 22, 2010 You need to have a PHP script on the remote server which sends a request for the content to your server. You can use the cURL library to do that, or it's also possible to do it yourself if the server supports HTTP through fopen (you can just use file_get_contents), or you can also manually open a socket and send the request.You could also look into making a SOAP service so that your server publishes a couple functions for SOAP clients to use, and then you would need to write a SOAP client for the remove servers to consume the web service.It's kind of strange to do things this way though, it sounds like all of the data for all of your sites is available publicly. Link to comment Share on other sites More sharing options...
dzhax Posted June 22, 2010 Author Share Posted June 22, 2010 Could you give me a little example code on how to send the data to the script to send the data back? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 22, 2010 Share Posted June 22, 2010 Look into cURL, you can use it to send a post or get request to the other server and get the response back. It's similar to ajax, except it works on the server instead of the browser. Link to comment Share on other sites More sharing options...
dzhax Posted June 23, 2010 Author Share Posted June 23, 2010 I went threw the whole installation process then when it told me to get it authorized by the Manager they told me it was already install but atleast i tried i am currently setting up my script to generate the URL to grab and so far it is working pretty good.Thanks Justsomeguy for telling me to use cURL Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.