How to make a website that redirects to a random link on a list? - redirect

I'm wanting to know how to make a redirect a simple way.
I know nothing about code (Sorry for my ignorance) but I want to learn.
So I want to make a website that only redirects, so when someone opens it will get redirected to another website.
The tricky thing here is that I want the website to select a random link in a list I will provide, so I thought I could do it on a free website creator (wix.com) and I wanted to know if someone could help me do the code for me.
Thank you a lot.

You will need Javascript and HTML for do this.
HTML just do static things, so you will need create a list with Javascript and then modify the link on html page.
Just add this to the Head on your HTML file:
<script>
window.location.replace('http://www.reddit.com')
</script>
That will redirect to Reddit as soon as you open your html file.
I recommend that you use the "IF / Else" or "for" function to redirect to different websites each time you open your web page, because you said that you are learning, so go slow. Just study Javascript or Dart and you can do whatever you want on your site.

Related

Tumblr share url

I've came across this page https://www.tumblr.com/examples/share/sharing-links-to-articles.html which shows a possible way to customly create a share URL for tumblr.
Simplified version of what they have:
Click to share
http://jsfiddle.net/m5ow6bhs/2/
This will take you to the log in page or straight to the share page if you're already logged in. However, if you change the http%3A%2F%2F part to a simple http:// it will now load to a "Not Found Page". http://jsfiddle.net/m5ow6bhs/3/ What the hell Tumblr?
Do you guys have any idea what's going on or what's the correct code to share something to Tumblr?
Cheers.
As with most share services, the URL should be passed as an encoded string. This supports the OPs comments about http%3A%2F%2F(encoded) and http:// (raw).
Tumblr provides variable transformations in the theme operators to handle encoding, but sadly it doesn't work with custom variables.
One quick solution is to drop the http:// part. Example: http://jsfiddle.net/L9jd8dhz/
I have discovered as of recently that the share URL needs to be updated as such:
https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=<-urlencode(share_url)->&posttype=link
The &posttype= seems to be a new requirement to make the share work correctly.

Web Page Redirect and Block Return

I'm using a simple (Meta) timed redirect on a web page. The viewer may wait the allotted time or click on a link to leave the page. I would like to block the viewer's ability to return to the original page after leaving it.
I've been cautioned about using Meta scripts due to the possibility of search engine rejection- true or not, I haven't a clue.
If possible, I would like to avoid Java or the use of cookies. Nonetheless, if Java is the best or only solution, I am open to it.
Your thoughts and guidance are greatly appreciated.
Thanks.
You can try something like this:
<script>
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
You can place that code on the page that you don't want the user accessing using the back button in the head section. But, it is not recommended since it might annoy your users.
This post explains things in a bit more detail from multiple users.

Use feedburner email subscription without Popup

For my selfhosted Wordpress blog, i wish to add Feedburner email subscription form.
Embed code from feedburner site:
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=[BLOGNAME]', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
My issue is, i dont want the popup window to show up. That thing is so 80's stuff.
Instead, is it possible to show the popup contents inline? Using JS or PHP or something?
Check out how div contents change over click here using JS: http://www.willmaster.com/library/web-development/replace-div-content.php
Would be great if something similar could be worked out.
I guess this is easy to do but i have limited knowledge on web designs and php/js/forms.
Thanks in advance.
PS: Please do not suggest plugins. I hate installing plugins unless absolutely necessary.
You can change target="popupwindow" to target="_self" or target="_blank", it can load in current page or go to a new page.

Facebook Integration into website

I'm looking to integrate the "like" button into a website, but I'm a little confused with the information available on the web. I read this article, which was in another stackoverflow article, but have some questions: http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/.
I've setup a "Page" already in facebook, and from what I understand in the link above, you need to setup an "App" to get an API key. What I don't understand though is that if I use this API Key, it's going to be pointing to my newly created "App", which has no fan base. How do I link this API Key, (or setup another key through the page admin), so I can have users "like" the real facebook page?
I want to run some javascript functions the moment a user likes the page, but I'm also a little confused on what API functions call, and whether these return a true/false value? I only really want to run these js functions if the user has not already liked the page..
Hope this all makes sense, would love any explanations you have to offer to point me in the right direction.
BUMP
after making a page and registering for it on face book, you will get a link, o trough the process again. Then just paste this link on your web site and you will get the like box. Paste it in a div tag.
You can also make a function in js which calls this like box and on its dependency you can call other js functions also.
//js code
function js()
{
create element div;
}
function other()
{
js();
}
If you just want an like button in your page , go to http://developers.facebook.com/docs/reference/plugins/like/
paste your fb page url in "URL to Like (?)" text box
get the code
paste in the div box of ur web site source code where you want it to appear

Facebook fan page canvas source?

Im trying to understand how to learn reading the source of a facebook fan page. So far, I can only get the layout displayed while viewing the source.
Here is an example: If you go here:
http://www.facebook.com/pages/See-oho-nieps-YothG-RRofiLe/106340746065367#!/pages/Milton-Keynes-United-Kingdom/IF-MR-BEAN-WAS-IN-AVATAR-HE-WOULD-LOOK-LIKE-THIS/302690570115
That canvas page requires you to be a fan of the page. This is done with:
content here
My question is, why cant I find the FB:visible code in the source of that page? I would be grateful for any guidance!
I believe it's because the FBML is interpreted server side, so if it output the markup their parser would have to be Javascript based, causing a greater risk to security (?) and slowing the process down entirely.
I'm not too familiar with it though, I must be honest.