News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Is there a rule on iframes or anything?

Started by Jade Elizabeth, October 06, 2015, 12:06:57 AM

Previous topic - Next topic

Jade Elizabeth

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?

* Jade Elizabeth looks at the customiser team :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Suki

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.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

JBlaze

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.
Jason Clemons
Former Team Member 2009 - 2012

Jade Elizabeth

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 :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kindred

basically... as I understand it, iframes are inherently insecure and can be easily intercepted/spoofed.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

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?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Suki

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.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Jade Elizabeth

Thanks Suki!

I didn't realise it wasn't on every server....hmmmm.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: