npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sphpdesk

v1.3.1

Published

Sartaj PHP Desktop Interface

Downloads

81

Readme

sphpdesk

Info

SartajPHP is a PHP framework for web applications, Command Line Application, Desktop Application with Hybrid Technology and Mobile Application with Hybrid and Ajax Platform. This PHP Framework used event oriented programming techniques. It is full flexible framework where you can build any type of application like MVC, Component Oriented, API, Multi Tier, Cross Platform, Web Service, plugin or extension for another PHP Frameworks, wrapper for another PHP frameworks or applications or your new things. This PHP Framework has lots of reusable PHP components. SartajPHP is giving life to lots of web,desktop and mobile applications.

VS Code Extension Available on Market Place search SartajPHP in VS code

For more info see:- https://github.com/Gold-Samiar/vscode-sartajphp-intellisense

Installation

How to install Sphp Server binary package?

  • With NPM:----
npm install -g sphpdesk
  • After Installation run command
npx sphpdesk

or direct call if symlink work, sometime nmp doesn't create symlink for binary

sphpdesk

It runs default project inside res folder. If you want to run directly sphpserver then you can create a symlink inside your bin folder. For run with double click on file app.sphp, you need to register .sphp file type with sphpserver application. Right click on app.sphp file and select open with and choose sphpserver application path.OR you can install on your desktop with installation file inside res/sphpserver folder

Use With Electron:-

Add in your package.json

  "dependencies": {
    "sphpdesk": "^1.3.0"
  }
Copy SartajPHP project files inside your electron project folder.
start.php file should be inside the www folder or what ever you give name for it.
ret = await sphpdesk.run_sphp_server("localhost",0,0,www_folder);

in main process file main.js

const sphpdesk = require('sphpdesk');
const { app, BrowserWindow } = require('electron');
var ls = null;
var win = null;
var mhost = 'localhost';
var mport = 8000;

const createWindow = () => {
  win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
        nodeIntegration: true,    
    }
  });
  win.loadURL("http://" + mhost + ":" + mport);
};

app.whenReady().then(async () => {
    ret = await sphpdesk.run_sphp_server("localhost",0,0,__dirname);
    mhost = ret.host;
    mport = ret.port;
    ls = ret.SphpServer;
    createWindow();
    app.on('activate', () => {
        if (BrowserWindow.getAllWindows().length === 0){
            createWindow();
         }
    })

});

app.on('window-all-closed', () => {
    ls.kill('SIGINT');
  if (process.platform !== 'darwin') app.quit();
})

Sphp Server Commands:-

  • Run Desk App mode:- sphpdesk proj_dir/app.sphp
  • Run Server App mode:- sphpdesk --proj proj_dir
  • Run as Script:- sphpdesk script myscript.php
  • Create Script:- sphpdesk createscript myscript
  • Read Settings from app.sphp and you can change running mode of sphpserver

app.sphp file settings:-

You can over-write these settings with console arguments:-
"project": Name of project,
"type": Run Mode:- srvapp or deskapp or consoleapp,
"host": "localhost",
"port": 0 : port number to serve server
"secure": 0 : no https
"php": "php": use system installed PHP or ""
"browser": "default":- System Default 
or "$exepath/browser/nw" your custom browser
or "" empty for inbuilt browser, these browser need libraries installed on system
 like WebView2 on windows and GTK3, WebKitGTK on linux

   browser command line arguments example:-
"browserparam": ["--url=$url"],
"browserparam1": ["--allow-file-access-from-files", "--disable-web-security", "--user-data-dir=$projpath/cache","--app=$url", "--disable-features=CrossSiteDocumentBlockingIfIsolating"],
"browserparam2": ["--app=$url"],
"browserparam3": ["--new-window", "$url"]

command line example:-
./sphpserver-linux --proj "/home/admin/web/domain.com/public_html" --type "srvp3" --port 8001 --host "domain.com" --php "php" --key "/home/admin/conf/web/ssl.domain.com.key" --cert "/home/admin/conf/web/ssl.domain.com.crt" --ca "/home/admin/conf/web/ssl.domain.com.pem"

Documentation

Community

Contributing

For Contribute and Support us please contacts on our Facebook Page

Security Issues

If you discover a security vulnerability within SartajPHP PHP Framework, please contacts us Facebook Page.