Tutorial Create A Simple Safelink Converter Website With PHP And JQuery

Want to make a website like safelinkconverter.com? At this tutorial, I will share a simple way to create the safelink website. The advantage of making the safelink website to increase your internet advertising income and of course google Adsense. If you’re PHP and javascript expert certainly not difficult to create your own safelink converter website.

Safelink is a simple website that will change all the download links that are on your website automatically become a short URL that redirected to the converter website. in the Safelink website will display ads from Google Adsense and the ads you post.

However, the safety of using the Safelink converter on google Adsense, I am not able to guarantee. My advice is better to use pop-up ads (pop ads, pop cash) on Safelink website.

Here’s a simple way to create a Safelink converter website

Tutorial Create A Simple Safelink Converter Website With PHP And Jquery

Create a link converter script that will change the entire URL on Ahref element into safelink URL

1. Create a folder that will be installed Safelink script with name “blog“. This “blog” folder contains an example HTML page with several links to other sites using the Ahref element.
2. create a file index.php in the folder “blog“.
3. Copy and paste the following code in index.php

4. A brief explanation

The above variables are used to hold the link that will not convert into safelink URL

Jquery function above is used to get the entire URL on a web page.

The function above to get the entire href attribute in a HTML element.

Surely every URL obtained from the script above is not a base URL, but along with the URL path name. Using the split function, we will take the host name URL / base URL. And javascript will check whether the link is allowed to be converted using jQuery.inArray function as the following code

As the example above, the safelink website address is http://localhost/bypass/index.php. Variable old is the original URL that we will convert. Then using window.btoa() function. Javascript will encode URL string into base64 encode. Up here the converter safelink script has been completed, the next will make a simple safelink website.

Create a simple converter safelink website

1. Create a new project folder as “bypass”.
2. Add new php file as index.php in the folder “bypass” and copy the following code :

3. A brief explanation :

I made two functions using PHP. The first function is file_get_contents_curl I use to get the html content from sites who will be converted using safelink script (especially taking title and meta description of a website). The second function get_data_web() is used to process html content and take the title and meta description of web to be visited.

Then using javascript setTimeout function set 5 seconds will bring up the link that will be visited.

Up here the script to run smoothly. How to use safelink converter script in WordPress? Paste the code below to widget bar WordPress

Up here how to make the Safelink website has been completed. But how to implement it on Blogspot?

To blogspot many articles you can find on google search engine, but I’ll summarize how to create Safelink website on blogger that I obtained from here

1. Create new Blogspot blog in blogger.com
2. Create a new page and give the name “go“.
3. Add the following script for a while and publish

4. Create new javascript file and save as safelink.js

Change http://safelinkweb.blogspot.com/p/go.html with your new Blogspot page URL.
5. Upload the safelink.js in yourjavascript.com.
6. See step number 3, change the link-javascript with safelink.js you have uploaded at yourjavascript.com

7. Reopen new page that you created earlier on blogspot (step 2) and add the following script under the javascript that you created earlier

don’t forget to change http://safelinkweb.blogspot.co.id/p/go.html with your new Blogspot page.

8. Copy the following javascript into the main Blogspot / your blog download so that the Safelink script can work well.

Change the variables of protected links with a link you do not want to be turned into Safelink website url

9. Edit your main blogspot template Template > Edit > HTML and change <body> to be : <body onload=”auto_safeconvert()”>

10. Save and see the result.

Download the full example  project here

Easy, right? Thus my article Tutorial Create A Simple Safelink Converter Website With PHP And Jquery.

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.