Standford Moss System is the Stanford University's famous code-checking system, it can find out which classmates submitted the code is copied others, so that the results are rejected. It's open to everyone who wants to use the system, so how do you use it in PHP projects?
-
Download MOSS php file moss.php
You can access Https://github.com/Phhere/MOSS-PHP To download moss.php and place it in your third-party extension library
-
Use moss.php
With the following example code you can simply do a moss quiz
<?php
include ("moss.php");
$userid = ""; Enter your moss userid
$moss = new Moss ($userid);
$moss->setlanguage (' Java ');
$moss->addbywildcard (' test/* ');
$moss->addbasefile (' Example.java ');
$moss->setcommentstring ("This is a Test");
Print_r ($moss->send ());
?
This code uses moss.php to perform the check of Java code. Unfortunately, however, $userid is needed.
3. Get userid
Since the
is an open system, there is also a way to get its account, that is, to send an email.
Send an email to [email protected] with
RegisterUser
Mail your email address (which may be used as a userid)
The next step is to wait for a reply. With the userid you can use moss happily.
This article starts at the top for the network, reprint please indicate the source
Use Standford Moss code to check the system in the PHP project