Magnet link: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
m (Still working on the page)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''For information regarding the technical details of magnet links, see [[Magnet URI scheme]].''
''For information regarding the technical details of magnet links, see [[Magnet URI scheme]].''
{{Languages}}
{{Languages}}
{{UpdatedPage|2010-08-16|2.5.3.0}}


Magnet links are a type of [[FAQ.P2PLinks|URI]] (Universal Resource Identifier) that is mostly used to link to one or several files in [[P2P network]]s, however, other usages do exist. In general, one can say that Magnets are used to assemble useful information about a thing (most often a file or similar resource), such as its location, name, hash sums or content in a clear, extensive format.


[[Magnet link]]s aim to be a sort of link that can be used independently of the p2p network, hashing algorithm or file-sharing program being used -- they aren't even limited to be used together with p2p at all. More informations about them can be found at the [http://magnet-uri.sourceforge.net/ Magnet-URI Project]. Since magnet links may contain any type of hash, not all magnet links can be used by all programs. For files located on the [[Gnutella]] and [[Gnutella2]] networks, they typically use the SHA1 hash.  For files on the [[eDonkey2000]] network, they use a hash commonly referred to as CMD4 or ed2k-hash. Shareaza understands either type of those links.  Magnet links can also contain more than one hash, which makes it easy to create links that are usable by a wide range of applications and networks.  Magnet links always start with the string "'''magnet:?'''". [[Magnet link|Creating and Using Magnet Links]].
== What are Magnet Links ==
Magnet links are a powerful tool that allows to provide a link to a specific file on a [[P2P network]] which can then be downloaded with a compatible program. Magnet links aim to be a sort of link that can be used independently of the P2P network, hashing algorithm or filesharing program being used, in fact, they aren't even limited to be used together with P2P at all. However, since Magnet links may contain any type of hash, not all Magnet links can be processed by all programs. For files located on the [[gnutella]] and [[G2]] networks, typically an SHA1 hash is included in the link, whereas for files on the [[eDonkey2000]] network, a hash commonly referred to as CMD4 or eD2k-hash is contained in the link for example. Shareaza is one of the rare applikations that brings support for almost all types of Magnet links.


Note that where normal web links start with <code>http://</code> or <code>https://</code>, Magnet links start with <code>magnet:</code>.


Magnets are a fantastic way of utilizing the power of P2P networks to share your files with the world. For instance, you can use Magnet links to share a specific file with your friends over IM (instant messengers, such as ICQ, MSN/WLM, Jabber or IRC), eMail or similar means without the need to send the file directly to them. On an other scenario, a visitor to your website can click on a Magnet link and download a file from hundreds of other people on the network. This means they aren't downloading it from your web server and racking up the huge bandwidth bill you would normally have to pay for hosting.


Shareaza and other P2P programs, like Phex, gtk-gnutella, Vuze or uTorrent can handle Magnet links. However, the Magnet support of BitTorrent clients differs greatly from Magnet support of [[P2P network]] programs (remember, [[BitTorrent]] is not a P2P network!), as BitTorrent clients use Magnets to link to torrents in the BitTorrent [[DHT]], using the BTIH (BitTorrent Info Hash) of the [[.torrent file|.torrent]] download.


Magnets are a type of [[FAQ.P2PLinks|URI]] (Universal Resource Identifier). They are used to assemble useful information about a thing (most often a file or similar resource) in a clear, extensive format. Most often, they are used to provide information about a file in a way that allows P2P programs to download the file from a P2P network.
== Using Shareaza to create and export Magnet links ==
For each file in your library, there is a right-click option to copy its URI. This can be used to copy into the clipboard either a Magnet link for the file with the file's <nowiki>BitPrint</nowiki> (the SHA1 and TigerTree hash) and File name, or an eD2k link. If you highlight multiple files in your library (by holding down &lt;Shift&gt; or &lt;Ctrl&gt; while selecting the file), there is an option to export more complex URIs to the clipboard, or to a file.


== What are Magnet Links ==
See the [[Library Manager]] Wiki page and the animated image below for more information on how to change the [[display mode]] to [[Power Mode]] and create a Magnet link from the context menu of a file in the Shareaza [[Library Manager]].
This means Magnet links are a powerful tool that allows to provide a link to a specific file on a [[P2P network]] which can then be downloaded with a compatible program. They are a fantastic way of utilizing the power of P2P networks to share your files with the world. For instance, you can use Magnet links to share a specific file with your friends over instant messengers (such as ICQ, MSN/WLM, Jabber or IRC), eMail or similar means without the need to send the file directly to them. On an other scenario, a visitor to your website can click on a Magnet link and download a file from hundreds of other people on the network. This means they aren't downloading it from your web server and racking up the huge bandwidth bill you would normally have to pay for hosting.


Shareaza, Phex and other [[gnutella]] programs can understand Magnet links. Azureus, as well as other [[BitTorrent]] clients are also able to use Magnet links. However, their usage of Magnet links differs from the usage of [[P2P network]] programs (remember, [[BitTorrent]] is not a P2P network!), as they use Magnets to link to torrents in the BitTorrent [[DHT]], using the [[BTIH]] (BitTorrent Info Hash) of the torrent download.
[[File:copy uri.gif|500px]]
 
== Using Shareaza to create and export magnet links ==
For each file in your library, there is a right-click option to copy its URI. This can be used to copy into the clipboard either a Magnet link for the file with the file's <nowiki>BitPrint</nowiki> (the SHA1 and TigerTree hash) and File name, or an eD2k link.  If you highlight multiple files in your library (by holding down &lt;Shift&gt; or &lt;Ctrl&gt; while selecting the file), there is an option to export more complex URIs to the clipboard, or to a file.
 
See the [[Library Manager]] Wiki page and the animated image below for more information on how to exactly copy URIs from the context menu.


While a file is in the process of being downloaded, it is also possible to copy its URI, but it is not possible to export URIs for multiple files from the download windows, like one can from Library Manager Window.
While a file is in the process of being downloaded, it is also possible to copy its URI, but it is not possible to export URIs for multiple files from the download windows, like one can from Library Manager Window.
See the animated image below to see how to change the [[display mode]] to [[Power Mode]] and create a Magnet link from the context menu of a file in the Shareaza [[Library Manager]].
:: [[File:copy_uri.gif|500px]]


== Using the export URI feature ==
== Using the export URI feature ==
Please refer to the [[Library Manager]] page for the process of exporting URI to a file or to the clipboard.
Please refer to the [[Library Manager]] page for the process of exporting URI to a file or to the clipboard.


== How to include Magnet Links on a WebPage ==
== How to include Magnet links on a web page ==
From the Export URI feature, export the magnets in 'html format' to a file. Add any tags to magnet that you wish to include. The [[Library Manager]] wiki page has some preformatted examples of tags you may wish to include.
To include Magnet links in a web page, the simplest way is to export them Magnets into 'html format' to a file using the Export URI dialog, including the necessary tags you might need. Have a look at the [[Library Manager]] Wiki page, which contains some preformatted examples of tags you may wish to include.


for example:
=== Example ===
enter in the export URI dialog box:
Enter the following in the Export URI dialog box:
  <nowiki>&lt;a href="magnet:?xt=urn:sha1:[SHA1]&xt=urn:tree:tiger:[TIGER]&xl=[ByteSize]&xt=urn:ed2k:[ED2k]&dn=[NameURI]"&gt;
  <nowiki><a href="magnet:?xt=urn:sha1:[SHA1]&xt=urn:tree:tiger:[TIGER]&xl=[ByteSize]&xt=urn:ed2k:[ED2k]&dn=[NameURI]">
[Name]&lt;/a&gt;&lt;br&gt;</nowiki>
[Name]</a><br /></nowiki>


Save the output to a file, which will look like (the hashes having been altered for ease of viewing: <nowiki>{...}</nowiki> has been added for missing sections):
Save the output to a file, which will look like (the hashes having been altered for ease of viewing: <nowiki>{...}</nowiki> has been added for missing sections):
  <nowiki>&lt;a href="magnet:?xt=urn:sha1:HA{...}I3&xt=urn:tree:tiger:H7{...}6I&xl=397&xt=urn:ed2k:27{...}3f&dn=test.txt"&gt;
  <nowiki><a href="magnet:?xt=urn:sha1:HA{...}I3&xt=urn:tree:tiger:H7{...}6I&xl=397&xt=urn:ed2k:27{...}3f&dn=test.txt">
test.txt&lt;/a&gt;&lt;br&gt;</nowiki>
test.txt</a><br /></nowiki>
 
NOTE: be cautious of the use of '&' when including these files in html pages. The use of '&' unescaped (as a delimiter) is correct for URI encoding in this instance, but web pages are also <nowiki>HTML</nowiki> encoded, and so the ampersand, ''&'', should technically be replaced with ''&amp;amp;'' . Most browsers or web page servers are not confused if you fail to do this step however.


You may want to include a little icon in your magnet link, before the 'clickable text', so that it looks pretty. There are some examples of icons you may wish to use for the links your webpage at the [http://magnet-uri.sourceforge.net/ MagnetURI web page].
Note: Be cautious of the use of '&' when including these files in html pages. The use of '&' unescaped (as a delimiter) is correct for URI encoding in this instance, but web pages are also <nowiki>HTML</nowiki> encoded, and so the ampersand (''&'') should technically be replaced with <code>&amp;</code>. Most browsers or web page servers are not confused if you fail to do this step however.


example:
You may want to place a little icon before the 'clickable text' of your Magnet link, so that it looks pretty. There are some examples of icons you may wish to use for the links your webpage at the {{al|Magnet URI SourceForge.net Project page|MagnetURI web page}}.
<nowiki>&lt;a href="magnet:?xt=urn:sha1:{...}&dn=somefile"&gt;&lt;img src="RelativeOrAbsolutePathToMyMagnetIcon.gif" align=middle border="0" ALT="error"&gt;somefile.file&lt;/a&gt;</nowiki>


== How to include Magnet Links in the Shareaza forums ==
Example:
<nowiki><a href="magnet:?xt=urn:sha1:{...}&dn=somefile"><img src="RelativeOrAbsolutePathToMyMagnetIcon.gif"
align=middle border="0" ALT="error">somefile.file</a></nowiki>


Magnet links can be included in posts on the shareaza forums using the [url]and[/url] tags. They use the format
== How to include Magnet links in the Shareaza Forums ==
Magnet links can be included in posts on the {{Shareaza Forums}} using the [url]and[/url] tags. They use the format
  [url=*magnet_link*]*display_text*[/url]
  [url=*magnet_link*]*display_text*[/url]
where ''*magnet_link*'' is the magnet link in question and ''*display_text*'' is the text displayed as the link. If this does not work for some reason, use the url linking as shown in the next paragraph.
where ''*magnet_link*'' is the Magnet link in question and ''*display_text*'' is the text displayed as the link. If this does not work for some reason, use the url linking as shown in the next paragraph.
 
== How can I post a magnet link on a website that does not recognize magnet links? ==


If a site does not recognize magnet links or blocks them then you can still link to the file using the magnet linker tool at [http://sure-raza.com/magnet:/linker.php sure-raza.com]. This service is very simple to use. simply add "''<nowiki>http://sure-raza.com/</nowiki>''" to the beginning of the magnet link
== How can I post a Magnet link on websites that do not recognize or block Magnet links? ==
  <nowiki>http://sure-raza.com/magnet:?xt=urn:bitprint:blahblahblah</nowiki>
If a site does not recognize Magnet links or blocks them, you can still link to the file using the magnet linker tool at [http://sure-raza.com/magnet:/linker.php sure-raza.com]. This service is very easy to use: simply add <code><nowiki>http://sure-raza.com/</nowiki></code> to the beginning of the Magnet link, to make it look like the following:
Then post it like you would post a link to a regular website.
  <nowiki>http://sure-raza.com/magnet:?xt=urn:bitprint:blahblahblah{...}</nowiki>
Then you can use it like any other web link to a regular website.


== See also ==
== See also ==
Line 63: Line 60:


== External Links ==
== External Links ==
* {{w|Magnet_URI_scheme|Magnet links}}
* {{w|Magnet URI scheme|Magnet links}}
* [http://magnet-uri.sourceforge.net/ http://magnet-uri.sourceforge.net/] - The SourceForge.net Project page
* [http://magnet-uri.sourceforge.net/ http://magnet-uri.sourceforge.net/] - The '''{{a|Magnet URI SourceForge.net Project page}}'''
* [http://groups.yahoo.com/group/magnet-uri/ Yahoo! Magnet link discussion group page].
* [http://groups.yahoo.com/group/magnet-uri/ Yahoo! Magnet link discussion group page].


[[Category:External Links]]
[[Category:External Links]]

Latest revision as of 18:45, 14 February 2014

For information regarding the technical details of magnet links, see Magnet URI scheme.

  Languages:

[[::Magnet link|English]] • [[::Magnet link/de|Deutsch]] • [[::Magnet link/es|Español]] • [[::Magnet link/fr|Français]] • [[::Magnet link/he|עברית]] • [[::Magnet link/it|Italiano]] • [[::Magnet link/nl|Nederlands]] • [[::Magnet link/pl|Polski]] • [[::Magnet link/pt|Português]] • [[::Magnet link/ru|Русский]] • [[::Magnet link/zh-hant|‪中文(繁體)]]

e
  Updated:

This page has been updated on 2010-08-16 for the release of Shareaza v2.5.3.0.

e

Magnet links are a type of URI (Universal Resource Identifier) that is mostly used to link to one or several files in P2P networks, however, other usages do exist. In general, one can say that Magnets are used to assemble useful information about a thing (most often a file or similar resource), such as its location, name, hash sums or content in a clear, extensive format.

What are Magnet Links

Magnet links are a powerful tool that allows to provide a link to a specific file on a P2P network which can then be downloaded with a compatible program. Magnet links aim to be a sort of link that can be used independently of the P2P network, hashing algorithm or filesharing program being used, in fact, they aren't even limited to be used together with P2P at all. However, since Magnet links may contain any type of hash, not all Magnet links can be processed by all programs. For files located on the gnutella and G2 networks, typically an SHA1 hash is included in the link, whereas for files on the eDonkey2000 network, a hash commonly referred to as CMD4 or eD2k-hash is contained in the link for example. Shareaza is one of the rare applikations that brings support for almost all types of Magnet links.

Note that where normal web links start with http:// or https://, Magnet links start with magnet:.

Magnets are a fantastic way of utilizing the power of P2P networks to share your files with the world. For instance, you can use Magnet links to share a specific file with your friends over IM (instant messengers, such as ICQ, MSN/WLM, Jabber or IRC), eMail or similar means without the need to send the file directly to them. On an other scenario, a visitor to your website can click on a Magnet link and download a file from hundreds of other people on the network. This means they aren't downloading it from your web server and racking up the huge bandwidth bill you would normally have to pay for hosting.

Shareaza and other P2P programs, like Phex, gtk-gnutella, Vuze or uTorrent can handle Magnet links. However, the Magnet support of BitTorrent clients differs greatly from Magnet support of P2P network programs (remember, BitTorrent is not a P2P network!), as BitTorrent clients use Magnets to link to torrents in the BitTorrent DHT, using the BTIH (BitTorrent Info Hash) of the .torrent download.

Using Shareaza to create and export Magnet links

For each file in your library, there is a right-click option to copy its URI. This can be used to copy into the clipboard either a Magnet link for the file with the file's BitPrint (the SHA1 and TigerTree hash) and File name, or an eD2k link. If you highlight multiple files in your library (by holding down <Shift> or <Ctrl> while selecting the file), there is an option to export more complex URIs to the clipboard, or to a file.

See the Library Manager Wiki page and the animated image below for more information on how to change the display mode to Power Mode and create a Magnet link from the context menu of a file in the Shareaza Library Manager.

While a file is in the process of being downloaded, it is also possible to copy its URI, but it is not possible to export URIs for multiple files from the download windows, like one can from Library Manager Window.

Using the export URI feature

Please refer to the Library Manager page for the process of exporting URI to a file or to the clipboard.

How to include Magnet links on a web page

To include Magnet links in a web page, the simplest way is to export them Magnets into 'html format' to a file using the Export URI dialog, including the necessary tags you might need. Have a look at the Library Manager Wiki page, which contains some preformatted examples of tags you may wish to include.

Example

Enter the following in the Export URI dialog box:

<a href="magnet:?xt=urn:sha1:[SHA1]&xt=urn:tree:tiger:[TIGER]&xl=[ByteSize]&xt=urn:ed2k:[ED2k]&dn=[NameURI]">
[Name]</a><br />

Save the output to a file, which will look like (the hashes having been altered for ease of viewing: {...} has been added for missing sections):

<a href="magnet:?xt=urn:sha1:HA{...}I3&xt=urn:tree:tiger:H7{...}6I&xl=397&xt=urn:ed2k:27{...}3f&dn=test.txt">
test.txt</a><br />

Note: Be cautious of the use of '&' when including these files in html pages. The use of '&' unescaped (as a delimiter) is correct for URI encoding in this instance, but web pages are also HTML encoded, and so the ampersand (&) should technically be replaced with &. Most browsers or web page servers are not confused if you fail to do this step however.

You may want to place a little icon before the 'clickable text' of your Magnet link, so that it looks pretty. There are some examples of icons you may wish to use for the links your webpage at the MagnetURI web page.

Example:

<a href="magnet:?xt=urn:sha1:{...}&dn=somefile"><img src="RelativeOrAbsolutePathToMyMagnetIcon.gif"
 align=middle border="0" ALT="error">somefile.file</a>

How to include Magnet links in the Shareaza Forums

Magnet links can be included in posts on the Shareaza Forums using the [url]and[/url] tags. They use the format

[url=*magnet_link*]*display_text*[/url]

where *magnet_link* is the Magnet link in question and *display_text* is the text displayed as the link. If this does not work for some reason, use the url linking as shown in the next paragraph.

How can I post a Magnet link on websites that do not recognize or block Magnet links?

If a site does not recognize Magnet links or blocks them, you can still link to the file using the magnet linker tool at sure-raza.com. This service is very easy to use: simply add http://sure-raza.com/ to the beginning of the Magnet link, to make it look like the following:

http://sure-raza.com/magnet:?xt=urn:bitprint:blahblahblah{...}

Then you can use it like any other web link to a regular website.

See also

External Links