Difference between revisions of "Data Feeds"
From WHMCS Documentation
(Created page with 'The Widgets in WHMCS are a dynamic way for extracting data from WHMCS for use on the pages of your website. They allow you to get information out of WHMCS such as product names,…') |
m |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | The | + | The Data Feeds in WHMCS are a dynamic way for extracting data from WHMCS for use on the pages of your website. |
− | They allow you to get information out of WHMCS such as product names, descriptions and pricing in real | + | They allow you to get information out of WHMCS, such as product names, descriptions, and pricing, in real time, onto the static pages of your site. When you make a change inside WHMCS, it will autoupdate on your website. |
==Examples== | ==Examples== | ||
− | The | + | The code samples below are ready to copy and paste into your webpage. You can set the variables in the requests, such as the product IDs and TLDs, as you need them. |
===Product Names=== | ===Product Names=== | ||
− | + | <source lang="php"> | |
+ | <script language="javascript" src="feeds/productsinfo.php?pid=1&get=name"></script> | ||
+ | </source> | ||
===Product Descriptions=== | ===Product Descriptions=== | ||
− | + | <source lang="php"> | |
+ | <script language="javascript" src="feeds/productsinfo.php?pid=1&get=description"></script> | ||
+ | </source> | ||
===Product Pricing=== | ===Product Pricing=== | ||
− | + | <source lang="php"> | |
− | + | <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=monthly"></script> | |
+ | </source> | ||
+ | |||
+ | ===Product Pricing and Currency=== | ||
+ | |||
+ | <source lang="php"> | ||
+ | <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=monthly¤cy=2"></script> | ||
+ | </source> | ||
===Domain Pricing Table=== | ===Domain Pricing Table=== | ||
− | + | <source lang="php"> | |
− | + | <style type="text/css"> | |
− | + | table.domainpricing { | |
− | + | width: 600px; | |
− | + | background-color: #ccc; | |
− | + | } | |
− | + | table.domainpricing th { | |
− | + | padding: 3px; | |
− | + | background-color: #efefef; | |
− | + | font-weight: bold; | |
− | + | } | |
− | + | table.domainpricing td { | |
− | + | padding: 3px; | |
− | + | background-color: #fff; | |
− | + | text-align: center; | |
− | + | } | |
− | + | </style> | |
+ | <script language="javascript" src="feeds/domainpricing.php"></script> | ||
+ | </source> | ||
===Individual TLD Pricing=== | ===Individual TLD Pricing=== | ||
− | + | <source lang="php"> | |
− | + | <script language="javascript" src="feeds/domainprice.php?tld=.com&type=register®period=1&format=1"></script> | |
+ | </source> | ||
===Domain Checker Form=== | ===Domain Checker Form=== | ||
− | + | <source lang="php"> | |
+ | <script language="javascript" src="feeds/domainchecker.php"></script> | ||
+ | </source> |
Latest revision as of 14:09, 30 April 2020
The Data Feeds in WHMCS are a dynamic way for extracting data from WHMCS for use on the pages of your website.
They allow you to get information out of WHMCS, such as product names, descriptions, and pricing, in real time, onto the static pages of your site. When you make a change inside WHMCS, it will autoupdate on your website.
Contents
Examples
The code samples below are ready to copy and paste into your webpage. You can set the variables in the requests, such as the product IDs and TLDs, as you need them.
Product Names
<script language="javascript" src="feeds/productsinfo.php?pid=1&get=name"></script>
Product Descriptions
<script language="javascript" src="feeds/productsinfo.php?pid=1&get=description"></script>
Product Pricing
<script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=monthly"></script>
Product Pricing and Currency
<script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=monthly¤cy=2"></script>
Domain Pricing Table
<style type="text/css">
table.domainpricing {
width: 600px;
background-color: #ccc;
}
table.domainpricing th {
padding: 3px;
background-color: #efefef;
font-weight: bold;
}
table.domainpricing td {
padding: 3px;
background-color: #fff;
text-align: center;
}
</style>
<script language="javascript" src="feeds/domainpricing.php"></script>
Individual TLD Pricing
<script language="javascript" src="feeds/domainprice.php?tld=.com&type=register®period=1&format=1"></script>
Domain Checker Form
<script language="javascript" src="feeds/domainchecker.php"></script>