CodeClerks

How to use the new API url feature



Write the reason you're deleting this FAQ

How to use the new API url feature

Please someone help me, how to use the api url to integrate into any website.
Please someone provide a working code for a .html or .php file
I have created my code, it is here : pastebin. com /Z21n4rg2
But if I create a php or html file using this code is not working How to use the new API url feature
I only get a blank page
Thanks !

Comments

Please login or sign up to leave a comment

Join
ionicware
You'll need jQuery for that to work. What is your goal and what is your website URL? I can help you get it working.



Are you sure you want to delete this post?

alexxxyo
I`m trying to integrate into a new blogger blog
I tried to edit html template but I can`t make it to work.
I need to code that must be insterted between <head> and </head>
and what command to use to call the script, to integrate where I need.
If is not possible with blogger, please give me the code to integrate into a empty website.

Thanks a lot!



Are you sure you want to delete this post?

ionicware
I've added Javascript code to fetch on the API page. Look for the example: Example Fetch with JavaScript

https://www.seoclerks.com/api/page/serviceads

You'll have to search to figure out how to add javascript to blogger and you might run into same origin policy security issues just using pure Javascript.



Are you sure you want to delete this post?

alexxxyo
I still can not make it to work even on my website How to use the new API url feature
I also tested it online at writecodeonline. com / php/ (remove spaces)
and I also get an error :
Parse error: syntax error, unexpected '<' on line 2

If someone have a working code please share what full code to paste in a php or html file

Do I have to add something before or after this code to make it to work?
Thanks



Are you sure you want to delete this post?

ionicware
You'll probably get a "Origin http://writecodeonline.com is not allowed by Access-Control-Allow-Origin" error which prevents it from working. You'll need to upload a server side script to do it (I posted a PHP cURL and file_get_contents) version at https://www.seoclerks.com/api/page/serviceads.

I created this for youpluslike.com (filename: apiGet.php):

<?php
/*
 * Simple file for YouPlusLike
 * which takes a GET param of URL so that
 * the SC API can be fetched via Javascript and
 * displayed on the page.
 * 3/28/2013
 *
 * Author: Jordan DeLozier
 *
 */

$search = $_GET['s'];
 
/*
 * Apply the search term to the URL
 */

if (empty($search))
{
$url= "https://www.seoclerks.com/api?type=inlinead&by=&c=0&ul=3&am=1&aff=1&g=0&sub=0&os=0&sp=0&oby=&oh=&f=singlehtml";
}
else
{
$url = "https://www.seoclerks.com/api?type=inlinead&s={$search}&by=&c=0&ul=3&am=1&aff=1&g=0&sub=0&os=0&sp=0&oby=&oh=&f=singlehtml";
}
 
/*
 * Fetch the data
 */

if (!empty($url))
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
$x = curl_exec($ch);
 
echo $x;
}


Change the &aff=1 to be your affiliate number (IE: &aff=23432) above but ensure you get your affiliate sales.

Upload to the root directory of the website you are working with. Then call the Javascript (or call this directly) where you want the ad to show like this:

<span id="ad1"></span>
<script type="application/javascript">
$(document).ready( function() {
        var api_url = 'http://yoursite.com/apiGet.php?s=facebook';
        $.get(api_url, function(data) {
                $('#ad1').html(data);
        });
});
</script>


Shoot an email to [email protected] or at http://helpdesk.ionicware.com - I'll be more than happy to write/create whatever you need to get this working. I may need access to your server/files though.
[/code] Shoot an email to [email][email protected][/email] or at [url]http://helpdesk.ionicware.com[/url] - I'll be more than happy to write/create whatever you need to get this working. I may need access to your server/files though.



Are you sure you want to delete this post?

alexxxyo
It is working now How to use the new API url feature
Thanks a lot for your help !



Are you sure you want to delete this post?

ionicware
Great to hear! What is the URL? I'd love to see it in action (and promote it in various places when I list those that use the API).



Are you sure you want to delete this post?

alexxxyo
It is a blog and the address is: cheapseoservicesonedollar at blogspot dot com
I`m using iframe, I noticed that I can use it in this way too How to use the new API url feature
But there is a problem !
When I click on any link a get redirected to the same service because the aff number is the same as service number
Can you please fix that?
maybe just replace in your api settings
seoclerks. com /linkin/36783/buy-twitter-followers/3225/
to
seoclerks. com /linkin/36783/buy-twitter-followers/3225/add-More-Than-800-Followers-on-Your-Twitter-Account-in-Maximum-6-Hours-Without-Your

Thanks !



Are you sure you want to delete this post?

ionicware
Cool site, I will definitely reference it and an iFrame makes sense. I completely forgot about it and made it more complex than it should have been.

The bug mentioned above is now fixed. How to use the new API url feature



Are you sure you want to delete this post?

alexxxyo
Thanks a lot !
Yes, is working great now !
Cool support ! Faster than everywhere !



Are you sure you want to delete this post?

ionicware
I've added your example to https://www.seoclerks.com/api/page/serviceads and linked to your site from that page as an example site using the technique.



Are you sure you want to delete this post?