HostinPK Posted October 23, 2011 Share Posted October 23, 2011 I have a static HTML page and I want to use this code. How can I use this PHP code in HTML page? 0 Quote Link to comment Share on other sites More sharing options...
grtoftis Posted October 24, 2011 Share Posted October 24, 2011 hi, thank you nice share... 0 Quote Link to comment Share on other sites More sharing options...
Ben-UNITServers Posted May 9, 2012 Share Posted May 9, 2012 Thank you very much 0 Quote Link to comment Share on other sites More sharing options...
afshin-virus Posted July 6, 2021 Share Posted July 6, 2021 hi i know this topic is old but i need load my announcement in whmcs v8.2 could you please help me? what can i do for loading announcements in this new version to an external php page? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted July 9, 2021 Share Posted July 9, 2021 Had some free time while waiting for a server to do backup to do database repairs on after data center lost power some how (PM still awaiting), so here you go: <?php use WHMCS\Application; use WHMCS\Database\Capsule; require("../init.php"); $Announcements = localAPI('GetAnnouncements', [] ); if ($Announcements['result'] === 'success') { foreach($Announcements['announcements']['announcement'] as $announcement) { ?> <div class="announcement" id="announce-<?=$announcement['id']?>"> <h5><?=$announcement['title']?></h5> <p class="announcement-body" id="announce-body-<?=$announcement['id']?>"> <?=$announcement['announcement']?> </p> <div><small>Date Posted: <?=$announcement['date']?></small></div> </div> <?php } } tweak as needed but that should work for the most part out of box . 1 Quote Link to comment Share on other sites More sharing options...
afshin-virus Posted September 8, 2021 Share Posted September 8, 2021 thanks On 7/9/2021 at 2:27 PM, steven99 said: Had some free time while waiting for a server to do backup to do database repairs on after data center lost power some how (PM still awaiting), so here you go: <?php use WHMCS\Application; use WHMCS\Database\Capsule; require("../init.php"); $Announcements = localAPI('GetAnnouncements', [] ); if ($Announcements['result'] === 'success') { foreach($Announcements['announcements']['announcement'] as $announcement) { ?> <div class="announcement" id="announce-<?=$announcement['id']?>"> <h5><?=$announcement['title']?></h5> <p class="announcement-body" id="announce-body-<?=$announcement['id']?>"> <?=$announcement['announcement']?> </p> <div><small>Date Posted: <?=$announcement['date']?></small></div> </div> <?php } } tweak as needed but that should work for the most part out of box . thank youuuu. it work perfect. is it possible to prepare a php code for loading knowledge base too? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.