how to generate embd code/blgger like widget with CodeIgniter? please give me the idea how to make
Lets say your widget html is rendered as an iframe.
For eg
<iframe src='http://somedomain/.../some-widget'></iframe>
Now, your embed code could be as simple as:
<script src="http://yourdomain/.../something.js"></script>
All you have to do inside something.js is :
document.write("<iframe src='http://somedomain/.../some-widget'></iframe>");
Generating any front-end code in CI is no different than regular PHP. Simply echo the html where you wish it to be. If you were a little more specific, I could help you more..
Using an iframe is the simplest solution. Hand out the iframe code to your users.
<iframe src="your url here"></iframe>
Checkout http://jsfiddle.net/vXu8a/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.