Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extend API
#1
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.
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#2
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
}
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
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...)
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#4
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.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#5
no problem... i just sent it to you via email.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#6
I will post the source and my error when I get home..
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply




Users browsing this thread: 1 Guest(s)