[PLUGIN] MyServer (PHP and MySQL)

Post your work in progress addons and get feedback

Post » Sun May 21, 2017 12:00 am

Message: swad can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi Folks,

This plugin will allow you to execute actions on your server from Construct 2 or Construct 3. MyServer works on all platforms.
The zip file contains the plugin and php file. You have to fill some variables in the php file and upload it on your server. Then you put the link to this file in the properties of the plugin.
The package contains also the code so you can use it into your web projects.

Please note that this plugin :
  • Doesn’t use JQuery (so it works with Construct 2 and Construct 3)
  • Is compatible with all versions of PHP.
  • Is compatible with all versions of MySQL
  • Will choose the best way to execute request (algorithm will use the most recent method)
  • Is not 100% secure, MyServer is secured as much as possible.

In this topic, I will keep you informed about the development of MyServer, you will be able to execute the followings actions :
Emails :
  • Send Email without HTML code (simple text)
  • Send Email with HTML code (styled)
  • Function will be called once the last Email will be successfully sent

Files :
  • Upload file to server
  • Function will be called once the last file will be successfully uploaded
  • Change file path
  • Function will be called once the last path file will be successfully edited
  • Remove file from your server
  • Function will be called once the file will be successfully deleted
  • Edit file name
  • Function will be called once the file will be successfully renamed
  • Create simple file (like .txt, .html …)
  • Function will be called once the file will be successfully created
  • Write content in simple file (.txt file or another simple file, you can’t write content of pdf file for example)
  • Function will be called once the file will be successfully filled with the content
  • Get content of simple file (.txt file or another simple file, you can’t read content of pdf file for example)
  • Function will be called once the content file will be successfully got. You can access to the file content using the expression fileContent
  • Append content of simple file
  • Function will be called once the content file will be successfully appended
  • Get full URL of file so you can download it
  • Function will be called once the file URL will be successfully got. You can access to this URL using the expression fileURL
  • Get size of file (Mo)
  • Function will be called once the file size will be successfully got. You can access to the file size using the expression fileSize
  • Check if file exists
  • Function will be called if the file exists
  • Function will be called if the file doesn’t exist

Folders :
  • Create Folder
  • Function will be called once the folder will be successfully created
  • Remove folder (the content in this folder will be also removed)
  • Function will be called once the folder will be successfully removed
  • Change name of folder
  • Function will be called once the folder will be successfully renamed
  • Check if folder exists
  • Function will be called if the folder exists
  • Function will be called if the file doesn’t exist
  • Get size of folder (Mo)
  • Function will be called once the folder size will be successfully got. You can access to the folder size using the expression folderSize
  • Get list of folders and files in folder
  • Function will be called once the folder content will be successfully got. You can access to the folder content using the expression folderContent

Database :
  • Create Database
  • Function will be called once the database will be successfully created
  • Destroy database (all tables will be removed)
  • Function will be called once the database will be successfully removed
  • Get database size
  • Function will be called once the database size will be successfully got. Use the expression dbSize to access to this value.
  • Get list of all tables name in this database
  • Function will be called once the tables will be successfully got You can access to the list using the expression dbContent

MySQL Tables :
  • Create table
  • Function will be called once the table will be successfully created
  • Destroy table
  • Function will be called once the table will be successfully removed
  • Change name of table
  • Function will be called once the table will be successfully renamed
  • Remove all lines of table
  • Function will be called once the table will be successfully dropped
  • Add row (column) to table
  • Function will be called once the row will be successfully added
  • Remove row of table Will be called once the row will be successfully removed
  • Change name of row in table
  • Function will be called once the row will be successfully renamed
  • Insert line (data) into table
  • Function will be called once the line will be successfully inserted
  • Remove line from table
  • Function will be called once the line will be successfully deleted
  • Edit line data
  • Function will be called once the line will be successfully edited
  • Get data from table
  • Function will be called once data will be successfully got. You can access to the array (contains all the values of all the lines) using the expression lineContent
  • Get size of table (Mo)
  • Function will be called once table size will be successfully got. You can access to table size using the expression tableSize

Session and cookies :
  • Start session
  • Function will be called once the session will be successfully started
  • Destroy session
  • Function will be called once the session will be successfully destroyed
  • Create session variable
  • Function will be called once session variable will be successfully set
  • Get value of session variable
  • Function will be called once value of variable will be successfully got. You can access to this value using the expression sessionValue
  • Set or edit cookie
  • Function will be called once cookie will be successfully set
  • Read value of cookie if exists
  • Function will be called once value of cookie will be successfully got. You can access to this value using the expression cookieValue

The problem : I have worked and still continuing to work seriously on this plugin and I need support to continue developing it. So I have found two solutions (you are free to suggest another solution), I'm waiting your opinion :D :
  1. I sell it on store, in this case, how much $ you will be able to pay ;
  2. I create patreon (or another system of donation) and I wait you support, so everyone can use MyServer and I continue developing and improving it. In this case, tell me if you are volunteer to donate

Thank you

N.B: Sorry for my english, it's not my native language :)

Here is pdf which contains details about the functions : https://www.dropbox.com/s/984f51z2nfarb ... r.pdf?dl=0
Last edited by swad on Thu May 25, 2017 11:50 pm, edited 1 time in total.
B
7
S
1
G
2
Posts: 23
Reputation: 1,403

Post » Mon May 22, 2017 11:13 pm

This sounds fantastic - I'd happily pay for it
B
59
S
21
G
9
Posts: 641
Reputation: 9,787

Post » Tue May 23, 2017 9:25 pm

@Elliott Thank you for your answer.

I still working on it, don't hesitate to request function which is not in my list
B
7
S
1
G
2
Posts: 23
Reputation: 1,403

Post » Thu May 25, 2017 11:14 am

iam think this is a good plugin! i will follow.
B
80
S
29
G
112
Posts: 195
Reputation: 62,035

Post » Thu May 25, 2017 2:32 pm

From what I understand you want to make a gateway that allows the frontend to control the database. By default fronted (JS) can't directly connect/control the database and there's a reason for that - vulnerability.

The MySQL user that handles all the functions you mention will need to have all or nearly all privilages (super user). Super user on the frontend is highly dangerous.

What ORM library do you plan to use? How do you plan to secure everything? Are you aware of MySQL Injection methods?

Sending email and other features are ok but controlling database on the level of creating/removing ones is kind of madness I would say (unless it's for dedicated control panel which then requires a solid authentication for each action).
ImageImageImage
B
27
S
16
G
73
Posts: 974
Reputation: 41,157

Post » Thu May 25, 2017 2:51 pm

Hi @BackendFreak

I know that it's dangerous sending requests from JS to server and I will warn all users about this.

Once I will finish developing MyServer, I will create website to download it, in this website I will give, for each function, information about the security, the dangers, and also the solutions to try to avoid them. Also you can choose to download or not a specific function.

MyServer blocks MySQL injections and I don't use any library.

Anyway, using or not using MyServer (so with ajax plugin), it's not possible to do 100% secure requests.
B
7
S
1
G
2
Posts: 23
Reputation: 1,403

Post » Thu May 25, 2017 9:23 pm

@totoe and @rudy

Sorry, I can't answer via private message because I have only 200 points.
So I answer here :
the plugin will be available soonly, something like 2 weeks in beta version.
B
7
S
1
G
2
Posts: 23
Reputation: 1,403

Post » Fri May 26, 2017 9:04 am

Wow! I can't wait for this plugin! Keep going bro!
~ it was hard to make it easy ~

project:

Naked Shooter:

https://www.scirra.com/arcade/multiplay ... oter-18134

https://youtu.be/mDzterC_yXE

Next Shooter:

https://www.scirra.com/arcade/multiplay ... oter-18917

bitcoin wallet: 1Jjug6HASeL82XsBDzrN7Uzh4Bt3vdwPbH
B
17
S
7
G
2
Posts: 83
Reputation: 2,450


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest