Use Standford Moss code to check the system in the PHP project, standfordmoss
Standford Moss is a well-known code re-checking system of Stanford University. It can identify the students who submitted the code and copied the code to reject the submitted results. It is open to anyone who wants to use the system. How can I use it in a PHP project?
Download Moss php file moss. php
You can access the https://github.com/Phhere/MOSS-PHP to download moss. php and put it in your third-party extension Library
Use moss. php
With the following sample code, you can simply perform a moss test.
<? 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 check the Java code. Unfortunately, $ userid is required.
3. Get userid
Since it is an open system, it is also possible to obtain its account, that is, to send an Email.
Send Email to moss@moss.stanford.edu, which contains
Registeruser
Mail your Email address (may be used as userid)
The next step is to wait for a reply. With userid, you can use Moss happily.
This article is first published on top search. For more information, see the source.