|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Zealot
![]() ![]() Join Date: Aug 2005
Location: UK
Posts: 117
|
API Development - SimpleXML
Hello All,
I have made a lightweight CMS with SimpleXML and Smarty. The idea being the database can be hosted on "the cloud" and the website on the odd hosting package. The "content" part is great and working fine, Now im getting to the "management system" part, and not sure how to process data between user and server. I first thought I'd append the API Request PHP Code:
PHP Code:
The next idea, if no one can correct the above or alternate method. Is to use PHP Curl, to POST data to a listener and return a Fail or Success. First API based website, so tad confused. |
|
|
|
|
|
#2 |
|
Twitter: @AnthonySterling
![]() Join Date: Apr 2008
Location: North-East, UK.
Posts: 3,274
|
If you're going to this extent, you may as well embrace cURL and REST then do it properly I reckon.
GET, POST, DELETE, HEAD and so forth... |
|
|
|
|
|
#3 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2005
Posts: 1,128
|
When web services comes in my mind, I always prefer SOAP. Though its a bit tough to start with ( as we have to deal with WSDL), once know makes your life in web service easier.
|
|
|
|
|
|
#4 |
|
SitePoint Guru
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2006
Location: Queensland, Australia
Posts: 700
|
For any system dependant on http transfers, I'd always use cURL as it's opens up all the functionality and power of HTTP, and provides a better level of error reporting.
|
|
|
|
|
|
#5 |
|
/(?i:\Abb\z)|(?![Bb]{2})/
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2004
Location: Wigan, United Kingdom
Posts: 636
|
|
|
|
|
|
|
#6 |
|
SitePoint Guru
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2005
Posts: 932
|
Ran into this problem just recently myself. I switched from GET similar to how you are doing it and now I am using POST via stream context just like Salathe recommended. The change took me roughly 10 minutes to figure out. I used these params:
PHP Code:
|
|
|
|
|
|
#7 |
|
SitePoint Member
Join Date: Nov 2009
Posts: 6
|
Hey i feel this is a good work you are doing.
|
|
|
|
|
|
#8 |
|
SitePoint Member
Join Date: Nov 2009
Posts: 1
|
The idea what you describe a great idea!
![]() |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 23:07.













Linear Mode
