Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post PHP HELP - Using A Variable In Tpl Or Html Block 
 
Hi all, I need a little help with a customization of my site.

For my community, I have an IRC channel hosted by azzurra.org. I'd like to put a block in home page (or global) which indicates the number of users in chat at that moment.


Azzurra provides me a script to do so: http://www.azzurra.org/scripts/forumfree.php?chan=MYCHANNEL


This script just prints in plain text a number.



Now, I'd like to put a script on my page that can take that number and put it on a variable, and use that variable to show something like "Chat ( n° )" in top menu overall_header.tpl (like the new posts function) or in an html block...


Can anybody help me with this?
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: PHP HELP - Using A Variable In Tpl Or Html Block 
 
Solved with this:


Code: [Download] [Hide] [Select]
<?php

function chat_users(){
$remote = "http://www.azzurra.org/scripts/forumfree.php?chan=MYCHANNEL" ;
$read = fopen($remote, 'r');
while (false !== ($num = fgetc($read))) {
$chat_users = $num;

echo "$chat_users";
}
}

chat_users();

?>

 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron