0

I have a client who wishes to use our website as a plugin on his website. His website is being developed in Ruby on Rails. While our website is a PHP website. I was considering using iframes to load my website inside theirs. However I am unsure if this is possible as I have no clue about the Ruby framework.

Please help.

Thanks in advance.

Prashant
  • 2,005
  • 3
  • 17
  • 24
  • Ruby on Rails renders HTML just like PHP. Have you tried embedding the ` – Blender Aug 17 '12 at 05:41
  • Thanks Blender.. I have used iframe before and have embedded the site before on other websites. But was unsure if its going to be something out of the box I have to do.. As reading from different blogs, I found several suggestions like REST which I am not very familiar with – Prashant Aug 17 '12 at 05:47

3 Answers3

2

Yes, you can. The HTML that is served to web browsers is independent of the web framework used on the server side. A browser will not be able to distinguish HTML generated by a PHP/Python/Rails web application if the generated HTML is same. For browsers, it's just HTML which it'll parse and display content accordingly.

In your client's Ruby on Rails site, you can have an iframe embedded like this

<iframe src="http://www.yourphpsite.com/php_page.php"></iframe>
Kulbir Saini
  • 3,926
  • 1
  • 26
  • 34
  • Thanks Kulbir.. I have used iframe before and have embedded the site before on other websites. But was unsure if its going to be something out of the box I have to do.. As reading from different blogs, I found several suggestions like REST which I am not very familiar with – Prashant Aug 17 '12 at 05:48
0

Iframes are independent from the framework you are using since they are purely HTML and can show any page that the visitor have access to. It might not be the most elegant solution, but it will work fine.

Karl-Johan Sjögren
  • 16,544
  • 7
  • 59
  • 68
0

Iframes are browser-side HTML elements and can include anything that can be pointed to by a URL, so yes. You can include a PHP website on a Rails website or a .NET site or a Java Site or a Python site or a whatever. Please understand the over all topology/landscape of what runs where and what exists where.

Aditya Sanghi
  • 13,370
  • 2
  • 44
  • 50