samu Posted May 5, 2010 Share Posted May 5, 2010 Hi All, I am new bie to WHMCS, i need to include the product.tpl file in one of my file i tried using the following gode to get the file, <?php $start_text = "<!--SWPRODUCTLIST_START-->"; $end_text = "<!--SWPRODUCTLIST_END-->"; $source = file_get_contents('https://billing.sitename.com/cart.php?gid=3'); $start_pos = strpos($source, $start_text) + strlen($start_text); $end_pos = strpos($source, $end_text) - $start_pos; $found_text = substr($source, $start_pos, $end_pos); $found_text = str_replace("/cart", "https://sitename.com/cart", $found_text); echo $found_text; ?> but i am getting whole page instead of the particular part... help me out thanks in advance /samu 0 Quote Link to comment Share on other sites More sharing options...
samu Posted May 6, 2010 Author Share Posted May 6, 2010 any one please help me out.. i am getting the whole product.tpl page while putting the script. i mean header and footer and other parts coming. i need only the products section... thanks 0 Quote Link to comment Share on other sites More sharing options...
samu Posted May 10, 2010 Author Share Posted May 10, 2010 i am getting file_get_contents(https://clients.sitename.com/cart.php?gid=3) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sitename/public_html/services/pack/index.php on line 233 plz help me out...tks 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.