Restrict access to additional web page

Restrict access to additional web page

by Emma Richardson -
Number of replies: 0
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I have a php file that combines html and a php api curl request to pull a list of recordings from an external website. The php file is working correctly and doing what I want it to do.

Due to it being php, I cannot just copy the code into an html block (which is what I would really like do) as it breaks the script.

So, I placed the file in the moodle folder on the server and then linked an iframe to it.  This worked but the file is now accessible to the outside world which I cannot allow.  I tried uploading the file to moodle as a resource and as a url but then it will not display as a webpage as it should.

My file structure is:

html head which includes some css styling.

php json curl request is then embedded in the html body tags.

no footer or anything so at end of php section just closing tags for php and html body.

I tried playing around with requiring config.php and is logged in at the beginning of the php section but that broke the php scripting.

Would appreciate any help.



Average of ratings: -