Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases > Coding Snippets
You last visited: Today at 20:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Server Availability-Notifier Kimsufi.com

Discussion on [PHP] Server Availability-Notifier Kimsufi.com within the Coding Snippets forum part of the Coding Releases category.

Reply
 
Old   #1
 
3lue's Avatar
 
elite*gold: 5
The Black Market: 204/0/0
Join Date: Feb 2012
Posts: 8,552
Received Thanks: 411
[PHP] Server Availability-Notifier Kimsufi.com

Wollte unbedingt an einen KS1-Server von OVH/Kimsufi herankommen, also habe ich mir ein kleines PHP-Skript geschrieben. Wurde jede Minute per Cronjob ausgeführt. Ist denke ich alles ziemlich selbsterklärend, für Fragen stehe ich aber natürlich zur Verfügung.

PHP Code:
<?php
function jsonp_decode($jsonp$assoc false) {
    if(
$jsonp[0] !== '[' && $jsonp[0] !== '{') {
       
$jsonp substr($jsonpstrpos($jsonp'('));
    }
    return 
json_decode(trim($jsonp,'();'), $assoc);
}

$data file_get_contents("https://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2?callback=Request.JSONP.request_map.request_0");
$data jsonp_decode($datatrue);

foreach(
$data["answer"]["availability"] as $key => $value) {
        if(
$value["reference"] == "142sk1") { //SK1 = KS1 (6€ Root)
                
$available false;
                foreach(
$value["zones"] as $key => $value) {
                        if(
$value["availability"] != "unavailable") {
                                
$available true;
                        }
                }
                if(
$available) {
                        
// hier hatte ich eine Benachrichtigung auf mein Handy per pushOver
                
}
        }
}
?>
3lue is offline  
Reply

Tags
kimsufi, ks1, notifier, ovh, script


Similar Threads Similar Threads
Kimsufi Server Mysql Installation
03/10/2014 - Metin2 Private Server - 40 Replies
Good lunch, "I'm trying to install Mysql 5.5 on FreBSD 9.2" "The commands I enter for the installation of Mysql 5.5" 1 -> * portsnap fetch extract * 2 -> * cd / usr/ports/databases/mysql55-server * 3 -> * make WITH_XCHARSET = all install clean * 4 -> * ee / etc / rc.conf * Edit and insert the * mysql_enable = "YES" * and the * background_fsck = "NO" *
Übernahme vom e*Notifier (und e*Notifier Mobile Edition) Projekt
01/11/2014 - elite*gold Trading - 11 Replies
Wie im Titel beschrieben, verkaufe ich das vollständige e*Notifier Projekt. Der Käufer erhält damit das Recht, dass Programm weiterzuverkaufen (oder ähnliches). Die Projektmappe gibt es nicht dazu (aus dem Grund, dass diese nicht verfügbar ist). Hier geht es zur PC Version und hier zur mobilen Version Das Projekt wurde in C# geschrieben. Durch das Kaufen des Projektes erhaltet ihr: - Verkaufsrechte für den e*Notifier - Verkaufsrechte für die mobile Application des e*Notifiers - Alle...
Sponsoring Kimsufi 16gb Dedicated Server
05/26/2012 - Metin2 Trading - 0 Replies
Looking to to sponsor this: 16gb Kimsufi Dedicated Server Processor- Brand: Intel Model: I5 Frequency: 4x 2.66+ GHz Architecture: 64bits Memory:16GB Hard Disk: 2TB
mqo size and availability
09/16/2007 - Final Fantasy XI - 2 Replies
Hallö, Ich wollte mal wissen wie groß so die .mqo Dateien für die Modelle in euren FFXI Ordner sind. Also ich brauch nur eine durchschnittliche Zahle "einer" Datei. Wollte auf der Arbeit mal testen ob ich die in c4d importieren kann anstatt den umweg über 3dsmax zu gehen. Wäre sehr nett wenn mir jemand ein kleines mqo File das im modelviewer ansehbar ist zusenden könnte oder hochladen würde. ------------------------------------------------- -------------- Hey i wanna know how large...



All times are GMT +2. The time now is 20:05.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.