abazoskib Posted June 23, 2009 Share Posted June 23, 2009 I want to allow a few different websites to insert data into my database, however I do not want to give the site owners a direct connection to my db. How would I set this up? I dont even know whre to start. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/ Share on other sites More sharing options...
flyhoney Posted June 23, 2009 Share Posted June 23, 2009 It sounds like you need to develop and API that will allow external sites you interact with your website. This can be done a ton of different ways. One of the better ways is to use HTTP + some data format, like JSON. This way people can make requests to your API and get back responses. For example, an external site makes a request like this: http://www.yoursite.com/api/do_this_action.php?param1=value1¶m2=value2 Your API would take this request and do something with it, and return a response that would be something like this (in JSON): {"response":0} The curl library allows you to make HTTP requests and retrieve responses. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862123 Share on other sites More sharing options...
abazoskib Posted June 24, 2009 Author Share Posted June 24, 2009 i was thinking something more along the lines of a soap webservice..how would i approach this, and does that mean i need to require all clients to install soap? Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862884 Share on other sites More sharing options...
flyhoney Posted June 24, 2009 Share Posted June 24, 2009 A SOAP webservice would do the trick. SOAP is not something you install necessarily, its a protocol. If you have a fully functioning, compliant SOAP webservice your clients should be able to use almost any language they want, be it PHP, Python, Ruby, ASP.NET etc.. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862887 Share on other sites More sharing options...
abazoskib Posted June 24, 2009 Author Share Posted June 24, 2009 great! ive looked at a few tutorials, (about 3 that i could find) and none of them worked. is there anywhere that i can look for help? im a complete beginner at soap, and i need lots of help as i am on a deadline. any ideas what i should do? Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862933 Share on other sites More sharing options...
flyhoney Posted June 24, 2009 Share Posted June 24, 2009 I know php has built in SOAP client/server classes but I dont know how well they work. A few years ago when I was working on PHP SOAP stuff we used nusoap http://www.scottnichol.com/nusoapintro.htm Maybe there are some good example using nusoap on the web. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862948 Share on other sites More sharing options...
abazoskib Posted June 24, 2009 Author Share Posted June 24, 2009 i looked at a bunch of stuff and nothing worked easily enough. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-862953 Share on other sites More sharing options...
flyhoney Posted June 25, 2009 Share Posted June 25, 2009 I'm afraid not everything is going to be easy. Sometimes you have to work hard Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-863042 Share on other sites More sharing options...
abazoskib Posted June 25, 2009 Author Share Posted June 25, 2009 i know that, but just staring at the screen wont teach me it. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-863495 Share on other sites More sharing options...
flyhoney Posted June 25, 2009 Share Posted June 25, 2009 How do you think anyone has ever accomplished anything? Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-863689 Share on other sites More sharing options...
WolfRage Posted June 25, 2009 Share Posted June 25, 2009 Sorry but I have to agree with flyhoney on this one, time to site down and tinker. Besides that is the best way to learn in my experience. Good luck and have fun. Also to help you out in the future, do not set deadlines for things you do not understand and if you have to; be extra generous. Quote Link to comment https://forums.phpfreaks.com/topic/163396-data-import-to-server-from-many-sources-security/#findComment-863697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.