OpenSource Virtual Mistress Idea

This is the place for general discussions on fetishes, sexuality and anything else. What's on your mind right now?
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

OpenSource Virtual Mistress Idea

Post by creative »

I decided to make this post after Kenneth came up with a really good point (here: http://www.milovana.com/forum/viewtopic ... 0&start=45).
Could have just posted in a reply but that kind of feels like spamming that topic.

IMO the only way of making a really good virtual mistress is making it opensource. All virtual mistress programs i have seen in the last 3 years have all failed or ended due to lack of time or other things.
So how to make one that wont end or fail? Well making it opensource. That way one can continue where the other one left off.

ATM this is nothing more then a idea. However im sure me and Kenneth are not the only web developers on this forum :-P

A other idea i had was to use phpdesktop (a local php runner or however you want to call it) and a webserver.
Teases, routines, etc would be stored on the webserver and downloaded with some scripts by phpdesktop.
(a local script checks dates, new content, etc and downloads the stuff... that way every user will also have to complete code on there PC).
When starting the program you need to login (this would be for using some sort of a user database.. wish would eventually allow the implementation of other users to for example increase your denial period or something like that.)

Anyways, atm this is nothing more then a idea.

Let me know what you guys think, and if you are interested in doing something with that. :)
User avatar
Danny16
Explorer
Explorer
Posts: 42
Joined: Sun Jul 18, 2010 5:16 am
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Submissive
Location: UK
Contact:

Re: OpenSource Virtual Mistress Idea

Post by Danny16 »

Sexscripts is open source I think
Just pick a few robots and let's party!

Online female domination blog
Kenneth
Explorer At Heart
Explorer At Heart
Posts: 109
Joined: Mon Apr 02, 2007 9:04 am
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by Kenneth »

Just to elaborate a bit... the idea was to gather a group of people with some time, and to come up with an open source project in a more common language.

Out of the top of my head, I'd support a combination of PHP + HTML5/Ajax, combined with some database (MySQL? or different?). The very general idea would indeed be to build a highly modular platform ('the Virtual Mistress'), with everything being open for discussion right from the start. A democratic process should be in place to decide which features are implemented, and how. Building it as a web app has several advantages too, including a mobile version (though features may be limited) and (opt-in) geolocation features. It would also not matter whether you're on Windows, Linux, Mac... and no need for other crappy dependencies (VB.NET Framework, Flash, Java...)

Also the scripts would be in a simple, open format. One could imagine the platform being hosted on a single site (e.g. Milovana and if you fail at a tease, it would automatically be forwarded to this online platform).

But as a user, you could also decide to download a simple setup which would run this web application on your computer - no need for internet. However, if you'd want to get punished for failing, it will require advertising at which website/IP address you're running this own copy of your virtual Mistress.

Location based domination could also be cool. A user marks some locations (home, work). The Mistress could send an email when the guy's at work, asking if he feels comfortable with the huge bulge of his chastity device in his pants. Or if the user is using a hosted version of this application, he could be told that he's the best slave of the pack; or that a Master in the neighbourhood is looking for a real slave.

Data could be posted online (perhaps part of a website running this program, is photo albums, for public humiliation, where other members could comment, maybe the 'Mistress' could even 'read' those comments back to you?).

But, from the start, it should also be very easy for non-programmers to write scripts.

Just tossing out some ideas, obviously lots of things would be opt-in or personalized.
---

About CyberMistress, 2005-2011
The CM software is my intellectual property and no one is allowed to distribute it. Use it at your own risk, no support whatsoever. I do not mind the sharing of content which was created for it by 3rd party. My content however is not to be shared.
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

I've thought about the idea myself and sort of designed a layout and a little code. All of the actual code will be in the file called _func.php. As I said, it's nowhere near done yet but *shrugs* I hope to get it workable in the next couple of weeks, any other ideas would be appreciated.

If you want to view the pages you'll need to download a web server such as XAMPP and possibly enable SQLite databases because they're all in PHP.

https://drive.google.com/file/d/0B7YNWH ... sp=sharing
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

I would suggest somewhat of a different layout and approach.

Heres some code, might be helpful or not :-)

html

Code: Select all

 <script type="text/javascript" src="/js/main.js"></script> <!-- jquery ajax code in this file--><div id="main_pun"></div><script type="text/javascript">load2div("get_pun", "main_pun", "?var=abc"); // does a get request to /ajax/get_pun.php?var=abc and loads the result in the get_pun div</script> 
jquery ajax

Code: Select all

 function load2div(target,div,get){    $.ajax({        type: "GET",        url: "/ajax/"+target+".php"+get,        timeout: 25000,        cache: true,        async: false, // we set this to false because we might want to load multiple divs at the same time and most browsers only accept 1 request at a time...         success: function(data){             $(div).html(data);        },        error: function(x, t, m){            $(div).html('<div class="erroredit"><h1>Error loading content</h1><p>Please <a href="'+div+"-"+target+"-"+get+'" id="reload2div">click here</a> to try again.<p></div>');        }    }); }// RELOAD2DIV (shown when error load2div)$(document).on("click","#reload2div",function(){         var page = $(this).attr("href");    var page_data = page.split('-');        $(page_data[0]).html('<div style="vertical-align:middle; text-align:center; margin-top:20px;"><img src="img/loading.gif" width="40" height="40" /></div>');    load2div(page_data[1],page_data[0],page_data[2]);    return false;}); 
Page that gets loaded by ajax (get_pun.php)

Code: Select all

<b>Punishments</b><br>blablabla
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

I think I get where you're coming from but I already went towards a SQLite database to store the punishments/tasks etc. rather than loading in from a PHP file (although I'm planning on doing that for 'sessions') which will allow for users to add them as well as just me.

Thanks for the suggestion, the updated zip is below, I still have to change the tasks and stuff based on points but it currently just chooses a random one every time you go to a page. Also, if you want to add punishments etc there's a database manager at the minute (_qwertyuiop.php) with the password 'admin'. Signin/up works.

Again, thanks for the suggestion :D. And if anyone knows a free host that allows adult content let me know :)

https://drive.google.com/file/d/0B7YNWH ... sp=sharing
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

The code i posted was more a demo on how to load the stuff without refreshing the page (ajax). As far as i can see from the code, right now the page updates on refresh.

Anyways, will have a further look when i have some more time. Might have some code lying around as well that might be of use.

As for a free host that allowed adult content google would be my best guess (theres a ton of free ones i know off but none of those allow for adult content)
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Ahh, I see what you mean, we could use it for the 'sessions' to avoid page refreshes, or javascript that could be cheated by F12-ing, might use it for the quotes as well *shrugs*, we'll see where the wind takes us :D .

Will look into google sites, cheers :)

[Edit:]
Looked into GSites and it doesn't look like I can upload/use PHP in it.
soumisseau
Explorer
Explorer
Posts: 8
Joined: Sun Aug 05, 2012 5:09 pm

Re: OpenSource Virtual Mistress Idea

Post by soumisseau »

if you guys need anything that's not programming, just let me know. And really, programming is waaaaaayyyyy out of my league sadly :wave:
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

Some more stuff that might be useful.

To make things easier i always use a core file.
(a core file is just a file with stuff you need on every page that contains code)
(this core file would be included at the top of every page containing php)

core.php

Code: Select all

// SHOW ERRORS (for debugging)ini_set('display_errors', 1); error_reporting(E_ALL); // SET CHARSET (we want all out forms to post in utf-8)// (we also want to set out database collation to for example uft8_gereral_ci)header('Content-Type: text/html; charset=utf-8');// <form action="x" accept-charset="utf-8">  // SET TIMEZOME (set a timezone, if not we get errors on time functions)date_default_timezone_set('America/Los_Angeles');  // SET DEFINES// here we set some defines.. so when we includes stuff or need a location we can do// something like include_once(LIB . '_func.php');      define('DS', DIRECTORY_SEPARATOR);if(empty($_SERVER['DOCUMENT_ROOT'])){ //fix hosts that dont provide the document_root   $_SERVER['DOCUMENT_ROOT'] = dirname(dirname(__FILE__));   }define('ROOT', $_SERVER["DOCUMENT_ROOT"] . DS);   define('LIB' , ROOT . 'lib' . DS);define('HELP', ROOT . 'helpers' . DS);define('CORE', ROOT . 'core' . DS);define('VIEW', ROOT . 'view' . DS);define('CACHE', ROOT . 'cache' . DS);define('AJAX', ROOT . 'ajax' . DS);define('SITES', ROOT . 'sites' . DS); // SET AUTOLOADER (auto load classes)// when using a class like $object = new someclassname(); we do not need to include the class filefunction __autoload($className){    $file = LIB . $className . '.php';    if(file_exists($file)) {        require_once $file;    }else{        echo "error: file not found"; exit;    }} // HELPER LOADER (load a helper class in a weird way that i find useful :P)/*for example, if we have a helper function for validation... in our code we load that class like this:$helper = new helper();$helper->load('validation');And then do something like:if($helper->validation->filename($_GET['something'])){    // yay its valid :)}*/class helper{       public function __construct(){       }    public function load($className){        $classFile = HELP . $className . ".php";         if(file_exists($classFile)){            include_once($classFile);               $class_name = "helper_" . $className;               $this->$className = new $class_name;                }else{            echo "error including helper"; exit;        }    }} // LOAD CONFIG VARS (get a bunch of stuff from a config file and extract it)// config.php contains a array with some config data...// like array('db_users_host' => 'localhost')// what does it do?.. well now in any php file we can simply use $db_users_hostrequire_once ROOT . "config.php";extract($config_main);?>
Alternatively this would only be included in the index and ajax files, since everything can run from the index.php.
Also as a first layer of security i would put the core, _func files in a folder and block access to those scripts (or in other words, limit the access to php) adding a htaccess file containing the following

Code: Select all

deny from all
One last thing that might also be useful. Since i personally love to use lots of folders.
.htaccess (this would go in the root .htaccess file)

Code: Select all

RewriteEngine onRewriteBase / # ASSETS (change folders.... remote /img/ folder point to the actual local folder /assets/img/... etc)# (i store my images in /assets/img/.. but in my html i just write /img/someimage.jpg)RewriteRule ^img/(.*) /assets/img/$1 [L]RewriteRule ^js/(.*) /assets/js/$1 [L]RewriteRule ^css/(.*) /assets/css/$1 [L] # 404 (show some cool 404 pages instead of the default... might be useful)ErrorDocument 404 /404.html ErrorDocument 403 /404.html 
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Thanks for the support soumisseau, you could make a list of tasks, punishments and rewards with point values if you want (the database only has 4 or 5 of each at the moment). Same goes for anyone who wants to contribute and can't/doesn't want to code :-D .

Currently, the tasks etc are (with point values so you can get an idea of how many points each thing should be):
Rewards
005 - Masturbate for 30 seconds using 2 fingers.
050 - Edge.
080 - Ruin and eat your cum.
100 - Ruin one orgasm.
175 - Cum through humping a pillow you sleep with (no barriers allowed).
200 - Cum through humping a pillow (with/without a barrier (condom etc.) ).
250 - Cum however.

Punishments
05 - Spank your ass 30 times each ass cheek.
05 - Clamp nipples for 5 minutes.
05 - Toothpaste on genitals for 5 minutes.
10 - No underwear for 48 hours.

Tasks
05 - Insert 2 fingers in your ass using lube.
10 - Butt plug in for 2 hours.



Creative, I've tried to put all of the functionality into one script and use the include_once feature, as for people accessing the PHP, I don't believe a server will ever give out the raw PHP (I might have to protect the database from hot linking though if I upload it *adds to to do list* ). The custom error pages would be a nice touch although for now I'm finishing the core functionality ( You can make them if you'd like? ). Thanks for your help... and the .htaccess code (I might use it) :smile: If I missed anything post or PM :-D

I'm now looking at heliohost as a host (They say you can't have illegal material, but don't say anything about adult) so you might see the site online soon after putting in the obligitory 18+ page (I probably need it) :-D :-D :-D

List of things implemented:
- Random quotes
- Signin/up (although this doesn't do a lot at the moment)
- Points are displayed from the database (Again, doesn't do a lot at the moment)
- Random task/reward/punishment displays each time you visit the page
- 18+ age check (for when online) ( Next release :) )

List of things being worked on:
- Points changing based on task/reward/punishment completion/failiure
- Rewards/Punishments based on amount of points

List of things to do next:
- Sessions
- Probably other suggestions :-D
- User CP (Password Change, reset account etc.)
- Staff stuff (Delete spam tasks etc)

List of things to get round to:
- Error pages (Creative? :-P )
- PMs
- Refresh the quote without refreshing whole page (thanks creative)
- Ds pairings (have a dom(me) send you tasks/punishments etc... Let me know if you want it )

Any other input will be appreciated :smile: and these lists will change as things get going... or they'll be reposted *shrugs*. And if anyone wants to have a go at implementing anything themselves create a page (Just copy and paste a page and get rid of the body div content) and a few functions and let us know, we'll make it work between us :-D .

Sorry for the long post XD
User avatar
eric
Explorer
Explorer
Posts: 41
Joined: Mon Dec 10, 2007 7:40 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by eric »

Has anything been posted to a public repo like github or bit bucket? I've spent my entire career building websites and would love to contribute.
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

Never worked with github, but after a little googling it looks like it might be very useful.

For the code i kind of have to assume you have little experience with using classes or simply choose not to use them.
Classes are easy to learn and in super simple are just like function except they can do much more.
Im not saying you should use them, just that they make a programmers life much easier in the long run.
On a side note, many of my php contain things that only work in php 5.2+.

On the 404 pages i might do them, aldo i prefer just to write code :P, the part of webdesign that i dont like a lot is the design part :lol:

When you have a little more code, and want, i could restructure it a bit to use the ajax loading (load without refrech).
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

eric wrote:Has anything been posted to a public repo like github or bit bucket?
Not yet, although I agree with creative and will try to set it up :D and will post a link once I do ( a few hours probably I'm not at home )
creative wrote:For the code i kind of have to assume you have little experience with using classes or simply choose not to use them.
I haven't used them in PHP, I was going to code the functions and then put them into classes (core functionality and then clean up)
creative wrote:On the 404 pages i might do them, aldo i prefer just to write code :P, the part of webdesign that i dont like a lot is the design part :lol:
It's totally up to you :)

And thanks for the offer, I think I'm only a few hours away from getting the points to work (when I have time, so probably the end of the week) and a little longer on the sessions, I cant decide whether to use ajax (thanks again creative) or just an iframe with a *random* PHP page and everything done from there using the style:

..........................?p=111
..............?p=11
?p=1...................?p=112
..............?p=12 etc
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Posted the files on GitHub

https://github.com/DareSlave96/VirtualDomme

Never really used it before but... new experiences :-D
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests