convert whole project (php,mysqli) into 4 to 5 line javascript for affiliate
I saw lots of scripts just like below what i got by this kind of scripts that they are generating dynamically a iframe and loading project url but i don't know how i can achieve (I have a module in php and i want to give this module to some people then they can just copy my 4 to 5 line javascript code and they can use it) can anybody explain me in details or any link for study this part thanks for your help ...
(function(d, sc, u) {
var a = d.createElement(sc), b = d.getElementsByTagName(sc)[0];
a.type = 'text/javascript';
a.async = true;
p.parentNode.insertBefore(a,b);
})(document, 'script', '//aff.example.com/inner/affiliate/js/example.js');
php iframe mysqli affiliate
add a comment |
I saw lots of scripts just like below what i got by this kind of scripts that they are generating dynamically a iframe and loading project url but i don't know how i can achieve (I have a module in php and i want to give this module to some people then they can just copy my 4 to 5 line javascript code and they can use it) can anybody explain me in details or any link for study this part thanks for your help ...
(function(d, sc, u) {
var a = d.createElement(sc), b = d.getElementsByTagName(sc)[0];
a.type = 'text/javascript';
a.async = true;
p.parentNode.insertBefore(a,b);
})(document, 'script', '//aff.example.com/inner/affiliate/js/example.js');
php iframe mysqli affiliate
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
1
Then you'll have to write some javascript code, which creates aniframe
and then appends your chat widget's url into itssrc
. Now you'll also have provide your usersonload
executable js (as in your example) which create a script tag and links tojs
file on your server (this is thejs
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)
– Jaswinder Singh
Nov 13 '18 at 12:03
add a comment |
I saw lots of scripts just like below what i got by this kind of scripts that they are generating dynamically a iframe and loading project url but i don't know how i can achieve (I have a module in php and i want to give this module to some people then they can just copy my 4 to 5 line javascript code and they can use it) can anybody explain me in details or any link for study this part thanks for your help ...
(function(d, sc, u) {
var a = d.createElement(sc), b = d.getElementsByTagName(sc)[0];
a.type = 'text/javascript';
a.async = true;
p.parentNode.insertBefore(a,b);
})(document, 'script', '//aff.example.com/inner/affiliate/js/example.js');
php iframe mysqli affiliate
I saw lots of scripts just like below what i got by this kind of scripts that they are generating dynamically a iframe and loading project url but i don't know how i can achieve (I have a module in php and i want to give this module to some people then they can just copy my 4 to 5 line javascript code and they can use it) can anybody explain me in details or any link for study this part thanks for your help ...
(function(d, sc, u) {
var a = d.createElement(sc), b = d.getElementsByTagName(sc)[0];
a.type = 'text/javascript';
a.async = true;
p.parentNode.insertBefore(a,b);
})(document, 'script', '//aff.example.com/inner/affiliate/js/example.js');
php iframe mysqli affiliate
php iframe mysqli affiliate
asked Nov 13 '18 at 11:26
Huzaifa UmairHuzaifa Umair
768
768
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
1
Then you'll have to write some javascript code, which creates aniframe
and then appends your chat widget's url into itssrc
. Now you'll also have provide your usersonload
executable js (as in your example) which create a script tag and links tojs
file on your server (this is thejs
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)
– Jaswinder Singh
Nov 13 '18 at 12:03
add a comment |
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
1
Then you'll have to write some javascript code, which creates aniframe
and then appends your chat widget's url into itssrc
. Now you'll also have provide your usersonload
executable js (as in your example) which create a script tag and links tojs
file on your server (this is thejs
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)
– Jaswinder Singh
Nov 13 '18 at 12:03
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
1
1
Then you'll have to write some javascript code, which creates an
iframe
and then appends your chat widget's url into its src
. Now you'll also have provide your users onload
executable js (as in your example) which create a script tag and links to js
file on your server (this is the js
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)– Jaswinder Singh
Nov 13 '18 at 12:03
Then you'll have to write some javascript code, which creates an
iframe
and then appends your chat widget's url into its src
. Now you'll also have provide your users onload
executable js (as in your example) which create a script tag and links to js
file on your server (this is the js
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)– Jaswinder Singh
Nov 13 '18 at 12:03
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280018%2fconvert-whole-project-php-mysqli-into-4-to-5-line-javascript-for-affiliate%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53280018%2fconvert-whole-project-php-mysqli-into-4-to-5-line-javascript-for-affiliate%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you talking about supplying your php code as a plugin/library for other projects or do you really want a JS include that calls your server. If JS include is your answer, then the simplest route is - write an AJAX call to your php code in javascript
– Jaswinder Singh
Nov 13 '18 at 11:40
for example : if you want to use a chat system by an API so what they will provide you Only they will give you 4 to 5 line code and just you need to put in your project header and you can use it thats it the same thing i want to do
– Huzaifa Umair
Nov 13 '18 at 11:51
1
Then you'll have to write some javascript code, which creates an
iframe
and then appends your chat widget's url into itssrc
. Now you'll also have provide your usersonload
executable js (as in your example) which create a script tag and links tojs
file on your server (this is thejs
file that creates the iframe; this is to ensure that updates are immediate and does not require user intervention)– Jaswinder Singh
Nov 13 '18 at 12:03