Display Student IP

Display Student IP

by Michigan Moodler -
Number of replies: 1
Is it possible to display a user's IP address within a HTML resource page using <?php echo $_SERVER["REMOTE_ADDR"];?>

Is it necessary to configure Moodle to process PHP within HTML or is this simply a .htaccess configuration?

Any help would be greatly appreciated.

Chuck
Average of ratings: -
In reply to Michigan Moodler

Re: Display Student IP

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
For security reasons, Moodle will not parse php within its html resource files.

To do this you would have to create the php file outside of moodle and upload it to your server in the main web accessible folder...

Jon