• Resolved helvetica123

    (@helvetica123)


    Hi, thank you for your plugin. I have a check plugin updater system and I want to connect your plugin with it.If there is no valid key, I don’t want give zip file. The updater system gives the zip file URL with a json.

    it checks this plugin.php automatically and sends license key to it.
    plugin.php?license=60f416581f911&secret_key=’ . YOUR_SPECIAL_SECRET_KEY . ‘&slm_action=’ . YOUR_ITEM_REFERENCE

    my plugin.php that is hosted my own website, get information and I want to check it like that

    if ($_GET["license"] == "60f416581f911" ) {
    
    		$json = file_get_contents("http://localhost:10013/wp-admin/?secret_key=60f23395185274.31257762&slm_action=slm_check&license_key=60f416581f911");
    		$obj = json_decode($json);
    		if ($obj->result == 'success') {

    but it doesn’t work unfortunately :/

    when I check

    $json = file_get_contents(“http://localhost:10013/wp-content/themes/text.txt”);

    txt file which contains your plugin json file, it works but it doesn’t when I try get json from API link.

    It gives cURL error 28: Connection timed out error.

    Why? thank you

The topic ‘file_get_contents doesn’t doesn’t witj API’ is closed to new replies.