Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Jade Elizabeth on October 06, 2015, 12:06:57 AM

Title: Is there a rule on iframes or anything?
Post by: Jade Elizabeth on October 06, 2015, 12:06:57 AM
I need to display a website on a page and want to submit this as a mod in the future. Should I use iframes or curl or javascript or something else? Are there rules for this sort of thing?

/me looks at the customiser team :)
Title: Re: Is there a rule on iframes or anything?
Post by: Suki on October 09, 2015, 06:35:37 PM
It all depends on what you really want to do, if you want to communicate with some website and that website has some sort of API then its always preferable to use their API.

Kinda need more details.
Title: Re: Is there a rule on iframes or anything?
Post by: JBlaze on October 10, 2015, 03:49:18 AM
iframes are the devil, so stay away from them if you can. That said, if you are looking to interact with another website or application, it's better to use an API or other means of taking their data and using it the way you want.

If you just want to view another website from yours, then yes iframes can be used, but it's preferable not to.
Title: Re: Is there a rule on iframes or anything?
Post by: Jade Elizabeth on October 12, 2015, 11:15:04 PM
There is no API, I did ask.

I need to display the website so that people don't have to go to it manually to see their info....the info on it includes a balance and some notifications. I think it would be really helpful to have access to this page in particular in the admin centre for my mod (many have asked for it because it's easier to click into admin to check -since you're managing it from there already - you have enough balance or have notifications than opening up a new tab and navigating to the page).

I was considering cURL to grab values from it but I'm not very experienced in it....so just trying to come up with some sort of solution :).
Title: Re: Is there a rule on iframes or anything?
Post by: Kindred on October 13, 2015, 08:19:10 AM
basically... as I understand it, iframes are inherently insecure and can be easily intercepted/spoofed.
Title: Re: Is there a rule on iframes or anything?
Post by: Jade Elizabeth on October 13, 2015, 11:53:29 PM
What does that even mean? Considering it's in a private admin area and coded into the template I don't think it would be as easy as in a post?
Title: Re: Is there a rule on iframes or anything?
Post by: Suki on October 19, 2015, 10:58:12 AM
Your best bet would be using curl and http://php.net/manual/en/book.dom.php  (not every host has it installed) to pick it up whatever you want from that page.
Title: Re: Is there a rule on iframes or anything?
Post by: Jade Elizabeth on October 19, 2015, 06:13:15 PM
Thanks Suki!

I didn't realise it wasn't on every server....hmmmm.