Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [url]

A Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it.

0
votes
2answers
36 views

The function to convert an object to a URL string

There is a function to convert object to the GET parameters for the ASP.Net controller. Is it possible to minimize the redundancy of the code, but not to the detriment of its readability? ...
2
votes
0answers
41 views

Database code for Python-based URL shortener

I had implemented a URL shortener with Python and a database. Please review the database part of the code. The idea is to create an MD5 hash of the URL in question and then store it in a database. The ...
1
vote
2answers
64 views

Simple router in PHP

Before I start writing my first MVC framework, I want to improve my code quality as much as I can, can anyone give me some constructive criticism on how I can improve this? It is a simple router, ...
3
votes
3answers
144 views

Parse a GET or POST string in C

This function takes a string from an HTTP POST or GET string, finds the specified variable, and allocates memory for the result and puts it in a string. The destination is given as an address of an ...
4
votes
1answer
38 views

Userscript to redirect insecure pages to HTTPS

I am developing a userscript that redirects insecure pages (HTTP) to the https: version. ...
10
votes
3answers
2k views

Imgur URL parser

Fairly new to Python, and I have been doing a few Edabit challenges, to better help with my problem-solving. I have just completed a some what semi-difficult challenge, and I was hoping for some feed ...
2
votes
1answer
51 views

Generate URLs based on user's menu choices

My program generates URLs. It takes in 3 variables and substitutes them in a URL to create different working URLs. It also has 3 options for language selection, which change the language of the page ...
1
vote
0answers
19 views

Differ returned web link from app scheme

I have a WebView, which loads the returned from a request url. The thing is, the url might ...
4
votes
2answers
64 views

Split URL into segments

I try to split URLs into segments. These segments got two information, their name and their own URL. The last segment in the segments list should not have the URL property because it's the current ...
1
vote
3answers
74 views

Always keep https in url

I wrote this recently, I thought I'd check if it was the best way to keep my url as an https at all times, any advice would be appreciated ...
0
votes
1answer
113 views

Object for generating HTML for hyperlinks

I have a function that generates HTML for hyperlinks. It's arguments may be string literals or variables read from the database. An example call to this function looks like: ...
1
vote
1answer
43 views

Building query params which append to URL in a browser

I was looking for a similar JavaScript method for http_build_query but did not find but create my own and here I am a bit confused to decide the right approach. ...
6
votes
3answers
167 views

Extending window.location give access to query string elements

I am attempting to add a property to access the query string elements on the window and am looking for feedback on this implementation. ...
4
votes
1answer
312 views

Splitting URLs into hierarchy-level directories

The goal is to split a URL like http://q.com/a/b/c to: ['http://q.com/a', 'http://q.com/a/b', 'http://q.com/a/b/c'] My code: ...
3
votes
2answers
278 views

Parse a clean slug URL

I have to implement a "user-friendly" URL for an employment website. The URL /jobs{parameters?} may be composed of up to three searching criteria separated by ...
6
votes
1answer
165 views

Creating URL with Builder pattern

What do you think about this piece of code? How would you design the builder pattern in this situation? ...
5
votes
1answer
911 views

Simple URL shortener

This URL shortener is just for my own use and it runs on my local machine. I created this for fun and I doubt if I would ever use it in production. Is my script any good? shortener.php ...
3
votes
3answers
2k views

Creating and parsing query strings

In a moment of boredom, I decided to write two methods, one of which would create a query string, while the other would parse it, the constraint I imposed on myself being that each method could not ...
0
votes
2answers
154 views

XSS Protection from Query Strings in Java

Looking for input on the code below. Generally, the idea is to take a String representing a URL query string such as param1=blah&param2=blah and encode them to ...
4
votes
1answer
213 views

URL pattern matching for request blocking

I'm trying to write a URL pattern matching utility that, given a pattern and a URL it'll tell whether the URL matches the pattern or not. I want to use this for users to provide a list of URL patterns ...
2
votes
1answer
128 views

Sorting elements in array with a certain condition

This is what I have: function get_create returns a link with new filtered/sorted properties: Code on screenshot ...
1
vote
0answers
106 views

Google URL shortener API client

The client consumes the Google URL Shortener API. What could I improve in terms of readability and code style? It is my first real project in Go. ...
3
votes
4answers
151 views

Query URL parameters in downloading pictures from network cameras

I have some URLs saved in my database, to download pictures from network cameras. Because each camera has it's own URL and parameters, we have to store the entire URL in a field in the database. My ...
5
votes
2answers
1k views
4
votes
1answer
91 views

Download and concatenate text files from multiple API endpoints

Background Chronicling America is an archive of digitized US newspapers hosted by the Library of Congress. The site allows programmatic access of its resources through an API, one part of which is ...
1
vote
0answers
164 views

PHP - Uri Parser for Routing

I'm trying to build my own PHP MVC framework. I want to implement a routing similar to how ExpressJS/NodeJS implements its routing by making use of Request Handlers. ...
3
votes
1answer
4k views

Joining strings to form a URL

I have to construct a URL string from smaller substrings. I'll usually have a resource url, an endpoint, a ...
5
votes
3answers
13k views

Splitting URL query string to key-value pairs

I have a URL query string "key={value}&key2={value2}&key3={value3}" and have to produce a key-value pair of the string by splitting ...
4
votes
2answers
95 views

Sign an EC2/S3 URL Version 3

From the previous 2 versions: Sign an EC2/S3 URL Version 2 I fixed the comments from the previous version. Most of the code remains the same (so I have split out the new code for review). The main ...
2
votes
1answer
58 views

Sign an EC2/S3 URL Version 2

Follow up on previous review: Sign an EC2/S3 URL I have fixed the previous comments. I have also added the code needed to sign HTTP header fields as part of the request. ...
5
votes
2answers
1k views

Create URL query string from dictionary

I have a dictionary of parameters and value, and the function creates a URL query string from it: ...
5
votes
2answers
147 views

Sign an EC2/S3 URL

The other day I found myself trying to walk through the instructions for signing an S3 URL. http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html Not as trivial as the ...
3
votes
2answers
60 views

Composing URLs for fetching passenger fares from multiple providers

Can someone give me advice, how to make this code look nice? ...
4
votes
1answer
2k views

Check website for update

I have written a program in Python that checks websites for updates (it checks in anything on the website changes) and notifies the user. The idea is downloading the webpage, stripping HTML tags off ...
2
votes
2answers
148 views

Read file with URLs to connect to them, search for patterns and generate output in multi-threading env

I've been implementing a little application that will read a text file that holds URL addresses (one address per line). Example: ...
8
votes
5answers
2k views

Selecting checkboxes based on URL parameters

Is there any way to reduce these lines of code? ...
4
votes
3answers
91 views

A Swiss Army like module for dealing with HTTP and URLs

I code a lot of web crawlers and web scrapers and I find myself writing the same functions over and over again. I also find myself having to come to Stack Overflow and find the answer to a question I ...
4
votes
0answers
494 views

Generating Bitly links in a Google Sheet

I have this set of functions in my Google Sheet to create a Bitly bitlink whenever data in a row is changed. While this does work, it seems really slow to me. Looking at the Execution transcript, it ...
5
votes
1answer
108 views

Selecting site to browse in python

This code is for part of my first major contribution to open-source, for the socli project. The purpose is to allow the user to select a site from the stack exchange network to browse and fill two ...
4
votes
1answer
52 views

Web app that splits a URL graphically

I wrote this web app that splits a URL graphically so that its parts can be customized to create a new URL. https://github.com/ibrahim-islam/urlpad. The app currently works as expected for usual URls ...
2
votes
1answer
248 views

URL whitelist class

I'm trying to make a class for safe redirection of URLs. Redirecting URLs is something you can have in a get parameter, for example: ...
3
votes
1answer
128 views

Function to get URL

This is a function I wrote which has the intention of extracting bits of the URL. For the latest version visit my GitHub. ...
4
votes
2answers
549 views

Filter out URLs with any of some given file extensions

I wrote some code to filter a list of links, URLs, with multiple conditions given by file extensions. I want to remove every URL that is not an HTML file. The code is: ...
1
vote
0answers
180 views

Parsing URL query strings in AngularJS

Here are two very small blocks of code I wrote while trying to fix a bug in AngularJS. Both do the same thing. I'm trying to understand how the two differ, mainly in terms of the tradeoff between cpu ...
4
votes
1answer
184 views

Raw replacement of space by %20 in Java

I tried coding this for practice. Is there a more memory-efficient way to work in place without using more arrays etc (using raw array operations)? ...
1
vote
1answer
595 views

Php class for url generator

I wrote a class to generate URL as I need. (Using http or https and switching off the rewrite rules) That is my first OOP code. It's the right approach, any suggestion? inc/class.urls.inc.php ...
3
votes
1answer
586 views

Remove a query string parameter from a URL

I have a URL in wstring format in C++, e.g.: http://stackoverflow.com?Country=US&City=Seattle&State=WA I want to get rid of Country query param from the ...
6
votes
1answer
326 views

Expanding url from shortened url obtained from tweet

I have a twitter data set. I have extracted all the expanded urls from the json and now am trying to resolve the shortened ones. Also, I need to check which urls are still working and only keep those. ...
10
votes
2answers
598 views

Taking YouTube links out of a list of GitHub repo READMEs

I have a .csv file that contains student GitHub repository assignment submissions. I made a script to go to each repository and extract the YouTube video that they must have provided in their README ...
5
votes
2answers
800 views

C++ Query String Parser

This query string parser is intended to parse the parameters and values of a parser query string. I'm particularly concerned about my use of std::move(...). I ...