Custom Add-on Application


#1

I have this following add-on that I am trying to add to my Splynx Server but its not working after I add it. What could I be doing wrong.

			<table>
				<thead>
					<th>
						<td>Server ID</td>
						<td>Server Name</td>
						<td>Location</td>
						<td>IP</td>
						<td>Status</td>
						<td>Creation Date</td>
						<td>Bandwidth</td>
						<td>Backups</td>
					</th>
				</thead>
				<?php
					
				// API key here
				$myVultrApiKey="xxxx"; 
				
				// Get current time to speed 
			    $loadingtime = time();
			    
				// Get your data from the API provider
				$json = file_get_contents("https://api.vultr.com/v1/server/list?api_key=$myVultrApiKey");
			    $data = json_decode($json);
				
				// Get live hosts
			    $liveCounter = substr_count($json, 'status":"active');
				
				// Get Offline hosts
				$deadCounter = substr_count($json, 'status":"off');
				
				// Sum the total
				$counterSum=$liveCounter + $deadCounter; 
				 
			    foreach ($data as $name => $value)  
			    {
			 
				?>
				<tr>				    
					<td><?php echo $value->SUBID; ?></td>
					<td><?php echo $value->label; ?></td>
					<td><?php echo $value->location; ?></td>
					<td><?php echo $value->main_ip; ?></td>
					<td><?php echo $value->power_status; ?></td>
					<td><?php echo $value->date_created; ?></td>
					<td><?php echo $value->current_bandwidth_gb; ?></td>
					<td><?php echo $value->auto_backups; ?></td>
				<?php
				 }//end for		 
				?>
				</tr>
			</table>

#2

solved and confirmed via Skype