GetSimple Support Forum

Full Version: Extend API
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was attempting the other day to add a check to one of my plugins to see if there was a new version available on the GS extend.

When I attempted this, I was unable to get it to work. I got an error (don't remember exactly what it was though) after some research I came to the conclusion that my host does not support outside domain requests. (is this even possible?)

If this is possible, is it even worth adding something like that to a plugin if it won't work on some hosts?

Also this is more of a question for chris, but is it possible to extend the API to gather specific user data such as email, username, and ECT.. Not sure exactly how you would do this but I think it would be nice.
Administrators can disable file_get_contents() outside of the server, that’s very possible. It depends on the fopen wrapper setting. Don’t ask me what the security concerns were though. I can’t recall.

If you want to use it inside your plugin you will probably need to do something like this:
Code:
if ((bool)ini_get('allow_url_fopen')) {
    // use fopen
} elseif (in_array('curl',get_loaded_extensions())) {
    // use cURL
} else {
    // server has no way to get external file
}
i hope this isnt the case, but of course - i cant test this outside of my own server. I dont think it is blocked though... but then again, this underscores why I need to get a host dedicated to GS. (but i cant pay for it, so i need some sort of donation to make it happen...)
It shouldn’t be caused by anything on this end of the API, Chris. Of course I’m saying ‘shouldn’t’ because I can’t be 100% sure unless Matt can post his error.

This reminds me, can we get JSONP on the API aswell? For those who want to use Javascript? I can implement it if you send me the current API source.
no problem... i just sent it to you via email.
I will post the source and my error when I get home..