Welcome to Geeklog, Anonymous Monday, January 06 2025 @ 09:13 pm EST

Geeklog Forums

Including content in a block


Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
Is there any way to include a webpage from another site in a block. Ok I better explain, there is a webpage that is included via shtml on other sites and would easily fit in a side block. (It's just some images that are updated daily. Any ideas as to how I would do that?

Thanks
Ron
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
SHTML won't work, but could easily be replaced with one or two lines of PHP. Something like
Text Formatted Code
function phpblock_grabsite()
{
    return implode ('', file ("http://www.example.com/whatever.html"));
}
 

bye, Dirk
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
Thanks Dirk,

That works really well, one problem, if I put it in lib_custom then I can only use that code once, all be it for several sites, any subsequent times I want to use it for other includes will add to the size of lib_custom. Maybe I'll have to design a plugin using that code with a variable for the url. Anyway I think I can work off of this. I am not very good at coming up with new things in php but I'm not so bad about working with and changing stuff that is already there.
 Quote

All times are EST. The time is now 09:13 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content