# Equivelent of php include

**URL:** <https://www.ruby-forum.com/t/equivelent-of-php-include/89926>\
**Category:** Rails\
**Created:** [March 23, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/equivelent-of-php-include/89926 "2007-03-23T21:32:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryce](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@Bryce](https://www.ruby-forum.com/u/Bryce)\
**Post date:** [March 23, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/equivelent-of-php-include/89926/1 "2007-03-23T21:32:16Z")

</div>

Hey Rails people,

I would like to do some really easy consuming of other web pages.  
Specifically, I’d like to show the public instance of my google  
calendar on my website. I have the calendar’s public address ( we’ll  
call it [www.google.com/calendar](http://www.google.com/calendar) for now), but don’t know how to  
include it in my view. I’ve been looking everywhere for the equivelent  
of php’s include or require methods. Any help here would be great.

Thanks a lot,  
Bryce

---

<div class="post-metadata">

**Author:** ![Bryce](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8edcca/32.png) [@Bryce](https://www.ruby-forum.com/u/Bryce)\
**Post date:** [March 23, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/equivelent-of-php-include/89926/2 "2007-03-23T22:33:23Z")

</div>

> I would like to do some really easy consuming of other web pages.  
> Specifically, I’d like to show the public instance of my google  
> calendar on my website. I have the calendar’s public address ( we’ll  
> call it [www.google.com/calendar](http://www.google.com/calendar) for now), but don’t know how to  
> include it in my view. I’ve been looking everywhere for the equivelent  
> of php’s include or require methods. Any help here would be great.

I’m not sure Rails has the functionality… also not sure you’d want it  
since I doubt you want the “…” tags that url is going to  
have (i don’t know anythign about google’s public calendar though).

You could suck it down using open-uri and then display it, but that’s  
gonna be slow.

If you could live with an iframe that would be the simplest and least  
load  
on your server… it would also protect the rest of your site a bit  
should  
that bit blow up…

-philip
