Jump to content

Adding query string to any URL


V

Recommended Posts

You can add as many variables to a url as you want.  The only danger is unknowingly using a variable that is already being used for something else.  If you are developing this website yourself, you should make sure you do your research and find out all the variables that it uses before you add more.  If the website is being developed by someone else, you should talk to them to make sure your variable isn't going to interfere with what they're doing.

Link to comment
Share on other sites

@hoogie thanks for the reply! That makes sense :) I should probably think of a way to automatically create a non-existing variable.

 

@kenrbnsn, I'm trying to send URL requests to some websites but their URL may vary in parameters. One might be ...somesite.com?existing_var=1234

 

or somesite.com?existing_var=1234&another_var=789

 

so I'm trying to figure if I can add for example, ?my_var=345 at the end of any link without getting script errors and successfully using GET on the sites I added the new parameter.

Link to comment
Share on other sites

@hoogie thanks for the reply! That makes sense :) I should probably think of a way to automatically create a non-existing variable.

 

@kenrbnsn, I'm trying to send URL requests to some websites but their URL may vary in parameters. One might be ...somesite.com?existing_var=1234

 

or somesite.com?existing_var=1234&another_var=789

 

so I'm trying to figure if I can add for example, ?my_var=345 at the end of any link without getting script errors and successfully using GET on the sites I added the new parameter.

 

You can do this, but you won't be able to do anything with the my_var variable unless you also control somesite.com.  Does that make sense?  You can pass any sort of variable to any site you want to, but unless you also control the site you're passing the variable to, it will just ignore it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.