Autoinstaller API

From Sohowiki
(Difference between revisions)
Jump to: navigation, search
(1. Ping our api to get latest build download link)
(1. Ping our api to get latest build download link)
Line 3: Line 3:
 
===1. Ping our api to get latest build download link===
 
===1. Ping our api to get latest build download link===
  
<code>
+
<nowiki>
 
# Pull data for current stable build
 
# Pull data for current stable build
 
ob_start();
 
ob_start();
Line 10: Line 10:
 
ob_end_clean();
 
ob_end_clean();
 
$current_stable_info_array = unserialize($pubBuild);
 
$current_stable_info_array = unserialize($pubBuild);
</code>
+
</nowiki>
  
 
===2. Download build file===
 
===2. Download build file===

Revision as of 14:11, 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

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

3. Write file to server

Personal tools