Go Back   Freethought Forum > The Marketplace > Computers & Technology

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2009, 09:37 PM
Ensign Steve's Avatar
Ensign Steve Ensign Steve is offline
California Sober
 
Join Date: Jul 2004
Location: Silicon Valley
Gender: Bender
Posts: XXXMMCLVII
Images: 66
Science URL Basics

This is a public service message to help people when they want to paste a link to the forum (or anywhere) and may be confused or annoyed by all the computer gibberish that's in the link. Sometimes the link breaks when you email it, or part of it turns into a smilie, or it becomes otherwise unusable. These instructions are meant to help you pare down your link to the minimum you need. Enjoy!

I. Anatomy of a URL:


This is the URL of this very page I am typing this post into right now:
Code:
http://www.freethought-forum.com/forum/newthread.php?do=newthread&f=48
http:// is the protocol (hyper-text transfer protocol). You can use other protocols like ftp:// for file transfer, or https:// for encrypted web pages (SSL). If you are typing in a credit card number, you want to make sure you see https.

www.freethought-forum.com is the domain name. It refers to a specific computer, or space on a computer. Domain names are unique. A DNS server (domain name service) translates each unique URL to an IP address. DNS actually resolves the url from right to left, starting with the top-level domain (.com, .org, .us, .uk), then the domain (freethought-forum), then the machine on that domain (www).

/forum/newthread.php is the location of a file on the computer that was found in the previous step. It's in a linux format, so the first slash indicates root*, then there's a folder in there called forum, and a file in that folder called newthread.php. The php file extension lets us know that it is a php file, which is just a more powerful way of serving up dynamic content, like forums and blogs. *It's not really the machine's root directory, but the root of all the web stuff.

Here comes the fun part (no really).

?do=newthread&f=48 These are the php parameters. The question mark indicates that we are done with the file name and we are about to get into the parameters. Ampersands are used to separate all other parameters.

So this one has two parameters, do=newthread and f=48. do and f are the names of the variables (programmed by the programmers) and newthread and 48 are the values that were put into those variables.

Programmers like to use plain English (heh) so they know what their code does, and that helps anybody else out who is reading the same code, be it another programmer, or users like us. So if we read straight across, we can guess what is going on. I am making a new thread in forum number 48.



II. Changing the Parameters:


It's fun and valuable to be able to read a url, but it gets even more interesting when you start playing around with editing them.

You've probably noticed that when you search for a post on the forum, and then post a link to the results, the search terms are highlighted in red and bold. Well, suppose I wanted to direct my readers to this post by godfry, but I wanted to hide the fact that I was searching for NBLs. Easy! The url for the search result is:
Code:
http://www.freethought-forum.com/forum/showthread.php?p=728531&highlight=NBLs#post728531
Do you see where it says &highlight=NBLs? I just have to delete that part out of the url, and the red bold disappears. (The stuff after the pound sign is redundant and beyond the scope of this primer ... ignore plz).

Google is notorious for adding way too much information to the url. Earlier today I wanted to show some pictures of hipsters, so I did a google image search for hipsters, and here's the link it gave me:
Code:
http://images.google.com/images?hl=en&q=hipsters&btnG=Search+Images&gbv=2&aq=f&oq=
Ugh! What is all that? Do we really need all that? Actually, no. So let's look at it and break it down. We see the protocol, domain, and filename: http://images.google.com/images and we remember that the parameters begin after the question mark. Looks like we have language equals English, query equals hipsters, blah blah blah who cares about the rest of it. I'll just cut and paste the important parts. Does http://images.google.com/images?hl=en&q=hipsters work? Yes it does. Can we take it a step further? http://images.google.com/images?q=hipsters. Still good! Turns out the only required variable is the query term itself.

With regular google (as opposed to images) the link gets even more verbose, and starts to include information about my browser that I might not want to share.
Code:
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=oQR&ei=OxRqSpMqhYS2B_bTlLgL&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=stupid+wop+dago&spell=1
Let's see if I can clean that up. http://www.google.com/search?q=feeding+the+homeless. Ah, that's much nicer.

Notice that it puts plus signs between the words. There are some characters, like spaces, that don't work in URLs. I can address those more next time.

Besides deleting parameters, you can change them. I'll post examples of that in the next lesson. (Be advised that by some definitions, this is considered "hacking", which is fucking laughable. But, yes, it really is that easy to become a hacker. The trick is just not to be afraid of crazy gobbledygook computer language when you see it, and try instead to figure out how much of it you can parse with your natural language skills.)

Finally, don't be afraid to experiment. You're not going to fuck anything up. You can't break the forum from your end (at least not by doing this kind of stuff :shakepenguin:). The worst that happens is the page doesn't work right, so you change your changes back and learned another way not to do it.

Good luck and have fun, hackers! :type:
__________________
:kiwf::smurf:

Last edited by Ensign Steve; 07-24-2009 at 09:48 PM.
Reply With Quote
Thanks, from:
BrotherMan (07-25-2009), curses (07-25-2009), D. Scarlatti (07-25-2009), Demimonde (07-25-2009), Goliath (07-25-2009), Kael (07-25-2009), LadyShea (07-26-2009), Pinecone (07-25-2009), slimshady2357 (07-25-2009), Stormlight (07-25-2009), viscousmemories (07-25-2009)
  #2  
Old 07-24-2009, 09:44 PM
Crumb's Avatar
Crumb Crumb is offline
Adequately Crumbulent
 
Join Date: Jan 2005
Location: Cascadia
Gender: Male
Posts: LXMMCDXXXVIII
Blog Entries: 22
Images: 355
Default Re: URL Basics

I have found it very useful when links are broken or missing or they simply don't have the links I want to go to. If you see something like p=1 then you can probably get to the next page by changing it to p=2. So you can jump ahead even if there are no link by setting P=108, or whatever. That kind of messing around is useful sometimes. :)
__________________
:joecool2: :cascadia: :ROR: :portland: :joecool2:
Reply With Quote
Thanks, from:
Ensign Steve (07-24-2009), Pinecone (07-25-2009)
  #3  
Old 07-24-2009, 09:46 PM
Ensign Steve's Avatar
Ensign Steve Ensign Steve is offline
California Sober
 
Join Date: Jul 2004
Location: Silicon Valley
Gender: Bender
Posts: XXXMMCLVII
Images: 66
Default Re: URL Basics

OMG HAXOR!

But, yeah, televisionwithoutpity is totally guilty of those kinds of broken links.
__________________
:kiwf::smurf:
Reply With Quote
  #4  
Old 07-24-2009, 09:49 PM
JoeP's Avatar
JoeP JoeP is online now
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMXCIII
Images: 18
Default Re: URL Basics

I don't understand the thread title.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #5  
Old 07-24-2009, 09:53 PM
Ensign Steve's Avatar
Ensign Steve Ensign Steve is offline
California Sober
 
Join Date: Jul 2004
Location: Silicon Valley
Gender: Bender
Posts: XXXMMCLVII
Images: 66
Default Re: URL Basics

U R a Loser Basically
__________________
:kiwf::smurf:
Reply With Quote
Thanks, from:
Adam (07-27-2009), BrotherMan (07-25-2009), D. Scarlatti (07-25-2009), Goliath (07-25-2009), Stormlight (07-25-2009), Zehava (07-25-2009)
  #6  
Old 07-25-2009, 12:46 AM
fragment's Avatar
fragment fragment is offline
mesospheric bore
 
Join Date: Jul 2005
Location: New Zealand
Gender: Male
Posts: VMCDXLIV
Blog Entries: 8
Images: 143
Default Re: URL Basics

Quote:
Originally Posted by Ensign Steve View Post
Be advised that by some definitions, this is considered "hacking", which is fucking laughable.
It's not hacking by itself, but there have been website attacks which have successfully sent malicious stuff through URLs. SQL injection, for example.
__________________
Avatar source CC BY-SA
Reply With Quote
  #7  
Old 07-25-2009, 01:05 AM
BrotherMan's Avatar
BrotherMan BrotherMan is offline
A Very Gentle Bort
 
Join Date: Jan 2005
Location: Bortlandia
Gender: Male
Posts: XVMMXIX
Blog Entries: 5
Images: 63
Default Re: URL Basics

Way back in my early days I thought I was quite clever. If I was directed to somewhere on the internets only to discover the link was broke I would eliminate pieces of the url until I found a useful web page. It work(s)(ed) great for online catalogs and such.

So...

Code:
http://www.freethought-forum.com/forum/showthread.php?t=20665
... would become...

Code:
http://www.freethought-forum.com/forum/
... and so on until a page resolved; and then I'd poke around until I found what it was I was looking for originally (if it still existed).

But understanding the hidden (lol) code of the URL will greatly enhance my leet hax0r skillzet. Thanks, ES!

:putercat:
__________________
\V/_
I COVLD TEACh YOV BVT I MVST LEVY A FEE
Reply With Quote
  #8  
Old 07-25-2009, 04:42 AM
Stormlight's Avatar
Stormlight Stormlight is offline
Quality Contributor
 
Join Date: Jun 2005
Location: Luxembourg
Gender: Male
Posts: XLVDXV
Images: 92
Default Re: URL Basics

Interesting thread! :thumbup:
__________________
Reply With Quote
  #9  
Old 07-25-2009, 05:29 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXX
Images: 28
Default Re: URL Basics

I don't think there are any .uk URLs. They are usually .co.uk or similar. Why the uk is different to other countries in this way I don't know.
__________________
Reply With Quote
  #10  
Old 07-25-2009, 05:35 AM
fragment's Avatar
fragment fragment is offline
mesospheric bore
 
Join Date: Jul 2005
Location: New Zealand
Gender: Male
Posts: VMCDXLIV
Blog Entries: 8
Images: 143
Default Re: URL Basics

Each country has its own agency handling the sub-domains for that country's top-level domain. While most chose to be consistent, a handful of countries struck out on their own. NZ also uses .co.nz and .ac.nz (instead of.edu.nz). Tuvalu sold their top-level domain and you can buy whatever .tv you like.
__________________
Avatar source CC BY-SA
Reply With Quote
Thanks, from:
ceptimus (07-25-2009)
  #11  
Old 07-25-2009, 10:51 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXX
Images: 28
Default Re: URL Basics

You don't see many .usa domains. I suppose when Al Gore invented the internet, he didn't want to appear too boastful about it. :)

This Flash animation gives a detailed explanation of how URLs are built up. :D

__________________
Reply With Quote
Thanks, from:
Stormlight (07-26-2009), viscousmemories (07-25-2009)
  #12  
Old 07-25-2009, 11:57 AM
Miisa's Avatar
Miisa Miisa is offline
NPC
 
Join Date: Aug 2005
Location: Hellmouth
Posts: VCDLIV
Default Re: URL Basics

Quote:
Originally Posted by ceptimus View Post
You don't see many .usa domains.
Hmph. Everything that DOESN'T have a national ending is basically USA. So .com, .org, .net, etc. The interwebs are American first and you just lease out bits here and there to the plebs.
__________________
:roadrun:
Reply With Quote
  #13  
Old 07-25-2009, 12:00 PM
Miisa's Avatar
Miisa Miisa is offline
NPC
 
Join Date: Aug 2005
Location: Hellmouth
Posts: VCDLIV
Default Re: URL Basics

And Stephen Fry had a good point, why do we say "double-u double-u double-u" in English? That's nine syllables, when saying "wuh wuh wuh" or even "World Wide Web" is just three. :scratch:
__________________
:roadrun:
Reply With Quote
Thanks, from:
ceptimus (07-25-2009), JoeP (07-25-2009)
  #14  
Old 07-25-2009, 01:59 PM
Ensign Steve's Avatar
Ensign Steve Ensign Steve is offline
California Sober
 
Join Date: Jul 2004
Location: Silicon Valley
Gender: Bender
Posts: XXXMMCLVII
Images: 66
Default Re: URL Basics

Quote:
Originally Posted by Miisa View Post
Quote:
Originally Posted by ceptimus View Post
You don't see many .usa domains.
Hmph. Everything that DOESN'T have a national ending is basically USA. So .com, .org, .net, etc. The interwebs are American first and you just lease out bits here and there to the plebs.
There is a .us top-level domain. The community college system in California, for example, is .cc.ca.us, not .edu. :shrug:
__________________
:kiwf::smurf:
Reply With Quote
  #15  
Old 07-25-2009, 02:27 PM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: URL Basics

Quote:
Originally Posted by Miisa View Post
Quote:
Originally Posted by ceptimus View Post
You don't see many .usa domains.
Hmph. Everything that DOESN'T have a national ending is basically USA. So .com, .org, .net, etc. The interwebs are American first and you just lease out bits here and there to the plebs.
I could be wrong but I don't think there's anything stopping unAmericans from registering .org, .net, or .com addresses.
Reply With Quote
  #16  
Old 07-25-2009, 03:54 PM
Crumb's Avatar
Crumb Crumb is offline
Adequately Crumbulent
 
Join Date: Jan 2005
Location: Cascadia
Gender: Male
Posts: LXMMCDXXXVIII
Blog Entries: 22
Images: 355
Default Re: URL Basics

And they do it too, those damn foreigners! :shakemonkey:

I believe there are some .or.us addresses too.
__________________
:joecool2: :cascadia: :ROR: :portland: :joecool2:
Reply With Quote
  #17  
Old 07-25-2009, 04:06 PM
lisarea's Avatar
lisarea lisarea is offline
Solitary, poor, nasty, brutish, and short
 
Join Date: Jul 2004
Posts: XVMMMDCXLII
Blog Entries: 1
Images: 3
Default Re: URL Basics

I give up.

Why is this thread?
Reply With Quote
  #18  
Old 07-25-2009, 05:31 PM
Miisa's Avatar
Miisa Miisa is offline
NPC
 
Join Date: Aug 2005
Location: Hellmouth
Posts: VCDLIV
Default Re: URL Basics

Quote:
Originally Posted by viscousmemories View Post
I could be wrong but I don't think there's anything stopping unAmericans from registering .org, .net, or .com addresses.
You are right, but originally it was just "let's put .com for commercial stuff and .gov and .org for more official stuff. There, settled. What? People want interweb addresses also outside the US?!? Well, let's make special ones for them." So the default for US addresses is just, well, nothing beyond being commercial or not.

Like the phone country code for the US being +1. :glare:

Finland has +358, BTW. :( I don't think there even ARE 358 countries in the world.
__________________
:roadrun:
Reply With Quote
Thanks, from:
ceptimus (07-25-2009), JoeP (07-26-2009)
  #19  
Old 07-25-2009, 05:33 PM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: URL Basics

:penguinglomp:
Reply With Quote
  #20  
Old 07-25-2009, 05:55 PM
Crumb's Avatar
Crumb Crumb is offline
Adequately Crumbulent
 
Join Date: Jan 2005
Location: Cascadia
Gender: Male
Posts: LXMMCDXXXVIII
Blog Entries: 22
Images: 355
Default Re: URL Basics

Quote:
Originally Posted by Miisa View Post

Like the phone country code for the US being +1. :glare:
Sorry, we can't help being number one, we just are... :D
__________________
:joecool2: :cascadia: :ROR: :portland: :joecool2:
Reply With Quote
  #21  
Old 07-25-2009, 08:33 PM
Miisa's Avatar
Miisa Miisa is offline
NPC
 
Join Date: Aug 2005
Location: Hellmouth
Posts: VCDLIV
Default Re: URL Basics

A heave burden, I know, but I guess somone must shoulder it... :rolls:
__________________
:roadrun:
Reply With Quote
  #22  
Old 07-25-2009, 08:43 PM
Anastasia Beaverhausen's Avatar
Anastasia Beaverhausen Anastasia Beaverhausen is offline
Vaginally-privileged sociopathic cultist
 
Join Date: Oct 2004
Location: La Mer
Gender: Female
Posts: MXDCLXXXIV
Blog Entries: 2
Images: 1
Default Re: URL Basics

Quote:
Originally Posted by ceptimus View Post
I don't think there are any .uk URLs. They are usually .co.uk or similar. Why the uk is different to other countries in this way I don't know.
There's also .co.au and .co.nz. You figure that one out. :thumbsup:
__________________
:hellokit:
Reply With Quote
  #23  
Old 07-25-2009, 08:59 PM
Crumb's Avatar
Crumb Crumb is offline
Adequately Crumbulent
 
Join Date: Jan 2005
Location: Cascadia
Gender: Male
Posts: LXMMCDXXXVIII
Blog Entries: 22
Images: 355
Default Re: URL Basics

Quote:
Originally Posted by Miisa View Post
A heave burden, I know, but I guess somone must shoulder it... :rolls:
Are you looking to get bombed? :P

In what direction is heaven from Helsinki? :D
__________________
:joecool2: :cascadia: :ROR: :portland: :joecool2:
Reply With Quote
  #24  
Old 07-26-2009, 10:19 AM
JoeP's Avatar
JoeP JoeP is online now
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMXCIII
Images: 18
Default Re: URL Basics

Quote:
Originally Posted by Miisa View Post

Like the phone country code for the US being +1. :glare:

Finland has +358, BTW. :( I don't think there even ARE 358 people in the world who want to phone Finland.
:fixed:
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Adam (07-27-2009)
  #25  
Old 07-26-2009, 12:05 PM
Miisa's Avatar
Miisa Miisa is offline
NPC
 
Join Date: Aug 2005
Location: Hellmouth
Posts: VCDLIV
Default Re: URL Basics

That is likely also true, but irrelevant to the point I was making. :shrug:
__________________
:roadrun:
Reply With Quote
Reply

  Freethought Forum > The Marketplace > Computers & Technology


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

 

All times are GMT +1. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Page generated in 0.93051 seconds with 15 queries