Postawił bym beczkę rumu za skrypt. Nawet w ten sposób, by zliczał różnice, dorobek a ręcznie by się wstawiło wyniki na forum, zawszę krok do przodu :whistle: i mniejsze prawdopodobieństwo pomyłki w zliczaniu
Ta sekcja pozwala Ci zobaczyć wszystkie wiadomości wysłane przez tego użytkownika. Zwróć uwagę, że możesz widzieć tylko wiadomości wysłane w działach do których masz aktualnie dostęp.
Pokaż wiadomości Menuhttps://www.arubacloud.pl/przetestuj-za-darmo.aspx?pk_campaign=adw-src&gclid=CjwKCAjwnrjrBRAMEiwAXsCc42owyWXjLXtRLlUha1n1YQaSht4mxv-RVN5ZQXpgg36GMkB7fbE7CRoCObQQAvD_BwE
https://boinc.berkeley.edu/addon_item.php?platform=web&item=b-sig.zip
<?php
/**
* "BOINC monitor" forum signature.
*
* @author Nicolas Alvarez <nicolas.alvarez@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License v3
*/
class RPC {
private $c;
public function __construct($ip='127.0.0.1', $port=31416) {
$this->c = fsockopen($ip, $port);
}
public function __destruct() {
fclose($this->c);
}
public function getResults() {
$req = $this->createRequest();
$req->documentElement->appendChild($req->createElement('get_results'));
list($reply, $xpath) = $this->sendAndGet($req);
$results_nl = $xpath->query('/boinc_gui_rpc_reply/results[1]/result');
//[active_task/active_task_state=1]
$results = array();
foreach ($results_nl as $result_el) {
$results[] = self::parseResult($result_el);
}
return $results;
}
private static function parseResult(DOMElement $result_el) {
$result = array();
foreach ($result_el->childNodes as $property_el) {
if ($property_el->nodeType != XML_ELEMENT_NODE) continue;
$tagname = $property_el->tagName;
switch ($tagname) {
case 'name':
case 'wu_name':
case 'project_url':
$result[$tagname] = (string)$property_el->textContent;
break;
case 'final_cpu_time':
case 'report_deadline':
case 'estimated_cpu_time_remaining':
$result[$tagname] = (float)$property_el->textContent;
break;
case 'state':
case 'exit_status':
$result[$tagname] = (int)$property_el->textContent;
break;
case 'active_task':
$result[$tagname] = self::parseActiveTask($property_el);
break;
}
}
return $result;
}
private static function parseActiveTask(DOMElement $activetask_el) {
$active_task = array();
foreach ($activetask_el->childNodes as $property_el) {
if ($property_el->nodeType != XML_ELEMENT_NODE) continue;
$tagname = $property_el->tagName;
switch ($tagname) {
case 'checkpoint_cpu_time':
case 'fraction_done':
case 'current_cpu_time':
case 'swap_size':
case 'working_set_size':
case 'working_set_size_smoothed':
case 'page_fault_rate':
$active_task[$tagname] = (float)$property_el->textContent;
break;
case 'active_task_state':
case 'app_version_num':
case 'slot':
case 'scheduler_state':
$active_task[$tagname] = (int)$property_el->textContent;
break;
}
}
return $active_task;
}
public function auth($password) {
$nonce = $this->getNonce();
$this->auth2($nonce, $password);
}
private function getNonce() {
$req = $this->createRequest();
$req->documentElement->appendChild($req->createElement('auth1'));
list($reply, $xpath) = $this->sendAndGet($req);
if ($xpath->evaluate('count(/boinc_gui_rpc_reply/nonce) = 1')) {
return $xpath->evaluate('string(/boinc_gui_rpc_reply/nonce)');
} else {
throw new Exception("Invalid reply\n".$reply->saveXML());
}
}
private function auth2($nonce, $password) {
$req = $this->createRequest();
$auth2 = $req->createElement('auth2');
$nonce_hash = $req->createElement('nonce_hash', md5($nonce.$password));
$auth2->appendChild($nonce_hash);
$req->documentElement->appendChild($auth2);
list($reply, $xpath) = $this->sendAndGet($req);
if ($xpath->evaluate('count(/boinc_gui_rpc_reply/authorized) = 1')) {
return true;
} else {
return false;
}
}
private function createRequest() {
$doc = new DOMDocument();
$req = $doc->appendChild($doc->createElement('boinc_gui_rpc_request'));
return $doc;
}
private function sendAndGet(DOMDocument $d) {
$this->sendXML($d);
$reply = $this->recvReply();
$r = new DOMDocument();
$r->loadXML($reply);
if ($r->documentElement->tagName == 'boinc_gui_rpc_reply') {
return array($r, new DOMXPath($r));
} else {
die($r->documentElement->tagName . " the hell?");
}
}
private function sendXML(DOMDocument $d) {
fwrite($this->c, $d->saveXML()."\003");
fflush($this->c);
}
private function recvReply() {
$reply = '';
$idx = 0;
//Stupid thing doesn't work in blocking mode; it blocks even when there
//is *some* data. It should return even with 1 byte.
stream_set_blocking($this->c, 0);
while (!feof($this->c)) {
$chunk = fread($this->c, 1024);
//avoid busy loops in non-blocking mode
if (strlen($chunk) == 0) usleep(1e5);
//$idx is an optimization: only search for the terminator on new
//data, skip what has been already searched.
$idx = strlen($reply);
$reply .= $chunk;
$p = strpos($reply, "\003", $idx);
if ($p !== FALSE) {
$leftover = substr($reply, $p+1);
$reply = substr($reply, 0, $p-1);
return $reply;
}
}
throw new Exception("EOF");
}
}
$boinc = new RPC('127.0.0.1',31416);
//$boinc->auth('password');
$results = $boinc->getResults();
$im = imagecreate(220,50);
//colors
if(isset($_GET['white'])) {
$background_color = imagecolorallocate($im, 255,255,255);
imagecolortransparent($im, $background_color);
$wuname_color = imagecolorallocate($im, 0x00, 0x33, 0x99);
$progress_color = imagecolorallocate($im, 0x00, 0x66, 0xcc);
} else {
$background_color = imagecolorallocate($im, 0, 0, 0);
$wuname_color = imagecolorallocate($im, 0x00, 0xcc, 0x99);
$progress_color = imagecolorallocate($im, 0x00, 0x99, 0xff);
}
//title
imagestring($im, 3, 40, 3, "BOINC Work in progress", $wuname_color);
//task list
$y=17;
foreach ($results as $r) {
if(isset($r['active_task']) && $r['active_task']['active_task_state'] == 1) {
$progress = $r['active_task']['fraction_done']*100;
$progressfmt = number_format($progress, 2, '.', '') . '%';
$name = $r['name'];
if($r['project_url'] == 'http://boinc.bio.wzw.tum.de/boincsimap/') {
$name = "$name (SIMAP)";
}
imagestring($im, 2, 5, $y, $name, $wuname_color);
imagestring($im, 2, 175, $y, $progressfmt, $progress_color);
$y+=12;
}
}
//send it back!
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
?>
https://boinc.berkeley.edu/addon_item.php?platform=web&item=b-sig.zip
$boinc = new RPC('127.0.0.1',31416);
//$boinc->auth('password');
https://setiathome.berkeley.edu/kiosk/
https://setiathome.berkeley.edu/show_host_detail.php?hostid=8804770
Cytat: Troll81 w 24 Sierpień 2019, 10:19
cenią się, jak z jakością koszulek?
https://tdruk.pl/design-editor/?product=25&product_cms=7232&share=5jxkdi0rw
Cytat: andy101fah w 23 Sierpień 2019, 11:05
Na razie nie mogę jeszcze użyć broni ostatecznej ale zawsze jest gotowa.
:attack: :attack: :attack:Nazwa domenowa bGI
Czas lokalny UTC +2 godzin(a)
Utworzony 23 Aug 2019, 8:29:21 UTC
Wszystkie punkty 106
Średnia liczba punktów 10.51
Liczba punktów we wszystkich projektach BOINCstats.com Free-DC
Typ procesora AuthenticAMD
AMD Ryzen Threadripper 1950X 16-Core Processor [Family 23 Model 1 Stepping 1]
Liczba procesorów 16
Koprocesory NVIDIA GeForce GTX 1060 3GB (3072MB) driver: 416.94
[4] AMD Radeon RX Vega (8176MB) OpenCL: 2.0
Virtualization Żadna
System operacyjny Microsoft Windows 10
Professional x64 Edition, (10.00.17763.00)
Wersja BOINC 7.14.2
Pamięć 15.9 GB