List scripts on your website

From Softaculous Wiki
Jump to: navigation, search

If you are a Web Host using Softaculous, you would like to list the ever changing list of Scripts in Softaculous.

Contents

Detailed Listing

If you want detailed list of scripts then you just need to install this package : File:ShowScripts.zip

If suPHP is running on your server then you need not to worry about any permission.

If not then generally files require 0644 and folder 0755 permission.

In package scripts.php and updated.txt requires 0777 permission.





Detaillist1.png



Detaillist2.jpg



Detaillist3.jpg



Simple

Its very simple to do that as Softaculous provides the list of scripts which is updated every now and then. You can access that list from the following URL : https://www.softaculous.com/scripts.php

It contains PHP code and $scripts is an array of the scripts.

If you would also like to show the Logos on your website you can use the following URL : https://www.softaculous.com/images/softimages/SCRIPTID_logo.gif
e.g. https://www.softaculous.com/images/softimages/26_logo.gif is the WordPress logo

Sample PHP code

The following Sample Code will show the logos and the Links to the respective demos as well.

<?php
 
define('SOFTACULOUS', 1);
 
$url = 'https://www.softaculous.com/scripts.php';
 
if(function_exists('curl_init')){
 
	// Set the curl parameters.
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
 
	// Turn off the server and peer verification (TrustManager Concept).
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
	// UserAgent and Cookies
	curl_setopt($ch, CURLOPT_USERAGENT, 'Softaculous');
 
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
	// Get response from the server.
	$code = curl_exec($ch);
 
	curl_close($ch);
}else{
	$code = file_get_contents($url);
}
 
eval(substr($code, 5));
 
foreach($scripts as $sid => $softw){
 
	echo '<a href="https://www.softaculous.com/demos/'.str_replace(' ', '_', $softw['name']).'" target="_blank" title="'.$softw['name'].'"><img src="https://www.softaculous.com/images/softimages/'.$sid.'__logo.gif" alt="" style="margin:15px;" /></a>';
 
}
 
?>

Category Wise Listing

The following Sample Code will show the logos and the Links to the respective demos grouped by Categories.

<?php
 
define('SOFTACULOUS', 1);
 
$url = 'https://www.softaculous.com/scripts.php';
 
if(function_exists('curl_init')){
 
	// Set the curl parameters.
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
 
	// Turn off the server and peer verification (TrustManager Concept).
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
	// UserAgent and Cookies
	curl_setopt($ch, CURLOPT_USERAGENT, 'Softaculous');
 
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
	// Get response from the server.
	$code = curl_exec($ch);
 
	curl_close($ch);
}else{
	$code = file_get_contents($url);
}
 
eval(substr($code, 5));
 
foreach($scripts as $id => $soft){
 
		// If its empty we assume its PHP
		if(empty($soft['type'])){			
			$soft['type'] = 'php';
		}
 
		// PHP Sripts - Backward Compatibility Variable
		if($soft['type'] == 'php'){			
			$catwise[$soft['cat']][$id] = $soft;
		}
 
		$allcatwise[$soft['type']][$soft['cat']][$id] = $soft;
	}
 
 
	foreach($allcatwise['php'] as $cat => $scripts){
 
	 echo '<div><a href="#" title="'.$cat.'"><img src="https://www.softaculous.com/images/cats/php_'.$cat.'.gif" alt="" /></a></div>';
 
        foreach($scripts as $sid => $softw){
 
	     	echo '<a href="https://www.softaculous.com/demos/'.str_replace(' ', '_', $softw['name']).'" target="_blank" title="'.$softw['name'].'"><img src="https://www.softaculous.com/images/softimages/'.$sid.'__logo.gif" alt="" style="margin:15px;" /></a>';
        }
	}
?>
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox