forked from engineerOfLies/rabbitmqphp_example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQAStatus.php
More file actions
executable file
·49 lines (38 loc) · 1.1 KB
/
QAStatus.php
File metadata and controls
executable file
·49 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/php
<?php
require_once('path.inc');
require_once('get_host_info.inc');
require_once('rabbitMQLib.inc');
$client = new rabbitMQClient("testRabbitMQ.ini", "testServer");
if (isset($argv[1])) {
$msg = $argv[1];
} else {
$msg = "";
}
// Ask the user for the build name
echo "Enter the build name: ";
$buildName = trim(fgets(STDIN));
// Ask the user for the version number
echo "Enter the version number: ";
$versionNumber = trim(fgets(STDIN));
// Ask the user for the status (passed/failed)
echo "Enter the status (passed/failed): ";
$status = trim(fgets(STDIN));
// Ask the user for the destination IP
echo "Enter your IP Address: ";
$ipDest = trim(fgets(STDIN));
// Prepare the request array
$request = array();
$request['type'] = "status";
$request['status'] = $status;
$request['build'] = $buildName;
$request['version'] = $versionNumber;
$request['devIP'] = $ipDest;
// Send the request to the RabbitMQ server
$response = $client->send_request($request);
// Display the response
echo "Client received response: " . PHP_EOL;
print_r($response);
echo "\n\n";
echo $argv[0] . " END" . PHP_EOL;
?>