Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. What you need now is some "API endpoints". These end points will be things like "get me a task" (returns task record, marks as "in progress") ... see my original description. I have an example of this in dsgmApp/app/api-v1.
  2.  
  3. The php file gets 2 arguments via $_GET: command and arguments. Arguments is a comma seperated list of base64 strings. This is to prevent n00b tampering and also stop there being commas which would fuck up it being a comma list. As you'll see (lines 8-21) this is decoded then it is easy to do the stuff. the API end points should be abstracted i.e. not long code in the select case (switch) - just call functions/class stuff underneath (incase it gets its data in a different way i.e. not via $_GET)
  4.  
  5. The point being, the code is good, now we just need to be able to instruct it to do stuff.
  6.  
  7. As a example there will be many of these virtual machines and they will get their tasks/files via this API, which is centralised
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement