Autoinstaller API

From Sohowiki
(Difference between revisions)
Jump to: navigation, search
(1. Ping our api to get latest build download link)
(2. Download build file)
Line 12: Line 12:
  
 
===2. Download build file===
 
===2. Download build file===
[code]$myfile = file_get_contents($current_stable_info_array['download_full']);[/code]
+
$myfile = file_get_contents($current_stable_info_array['download_full']);
  
 
===3. Write file to server===
 
===3. Write file to server===

Revision as of 14:12, 22 October 2009

Contents

Here's the basic step by step for writing your own installer script

1. Ping our api to get latest build download link

# Pull data for current stable build
ob_start();
include("http://update.securexfer.net/public_builds/api-build_info-stable.php");
$pubBuild = ob_get_contents();
ob_end_clean();
$current_stable_info_array = unserialize($pubBuild);

2. Download build file

$myfile = file_get_contents($current_stable_info_array['download_full']);

3. Write file to server

Personal tools