english/administrator/components/com_installer/models/install.php
/**
	 * Install an extension from a URL
	 *
	 * @return	Package details or false on failure
	 * @since	1.5
	 */
Install an extension from a URL
@return      Package details or false on failure
@since       1.5
Install an extension from a URL @return Package details or false on failure @since 1 . 5
protected function _getPackageFromUrl()
	{
		$db = JFactory::getDbo();
		$url = JRequest::getString('install_url');
				if (!$url) {
			JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL'));
			return false;
		}
		$p_file = JInstallerHelper::downloadPackage($url);
				if (!$p_file) {
			JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_INVALID_URL'));
			return false;
		}
		$config		= JFactory::getConfig();
		$tmp_dest	= $config->get('tmp_path');
		$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file);
		return $package;
	}
protected function _getPackageFromUrl ( ) { $ db = JFactory :: getDbo ( ) ; $ url = JRequest :: getString ( 'install_url' ) ; if ( ! $ url ) { JError :: raiseWarning ( '' , JText :: _ ( 'COM_INSTALLER_MSG_INSTALL_ENTER_A_URL' ) ) ; return false ; } $ p_file = JInstallerHelper :: downloadPackage ( $ url ) ; if ( ! $ p_file ) { JError :: raiseWarning ( '' , JText :: _ ( 'COM_INSTALLER_MSG_INSTALL_INVALID_URL' ) ) ; return false ; } $ config = JFactory :: getConfig ( ) ; $ tmp_dest = $ config -> get ( 'tmp_path' ) ; $ package = JInstallerHelper :: unpack ( $ tmp_dest . '/' . $ p_file ) ; return $ package ; }
Install an extension from a URL
 @return      Package details or false on failure
 @since       1.5
Install an extension from a URL @return Package details or false on failure @since 1 . 5
// Get a database connector // Get the URL of the package to install // Did you give us a URL?
 // Download the package at the URL given // Was the package downloaded?
 // Unpack the downloaded package file