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.

learn more… | top users | synonyms

4
votes
1answer
59 views

Short hash generator

I am working on some code that will generate a link with a relativly unique 10 character hash. I am not worried to much about colisions as long as they are rare enough that I could have a couple ...
2
votes
0answers
30 views

Item purchasing using urllib

I have this function that gets an item passed from another function, together with the subtotal and the fee of the item. The function has to act as fast as possible, as other people also want the ...
3
votes
2answers
34 views

Extracting and normalizing URLs in an HTML document

I have written code to get all urls on a webpage & put them in a set, and would like tips on simple changes I can make to increase its performance. ...
2
votes
2answers
47 views

Prettifying URLs for a PHP-based club website

I have a website for my car enthusiast club ("example.org") whose content can be divided into three main sections: Startseite (the "front page" of the site), Mitglieder (membership directory), and ...
4
votes
1answer
52 views

Adding proper validations on all the parameters coming from the URL in Rest Service

I am working on a RestService in which my URL will take lot of parameters. Below are the parameters my URL will take: UserId: ...
5
votes
3answers
324 views

Getting 6 possible URL parameters

I am in the midst of writing a simple job board and I have the URL's filtering and working how I want, everything works - I just want to know if I can improve it, if there are any security concerns, ...
1
vote
2answers
54 views

Manipulating URL parameters

I am new in JS, I am writing some extra filters on the Interface. So extra filter needs to add or update the parameter in the URL. Option 1. No parameter in existing URL: url = ...
2
votes
2answers
317 views

Return the first word in the image name

I just want to return the first word in the image name (before the dash, dog in my example). Now I use it like this but believe it can be done in a simpler way ...
3
votes
2answers
123 views

Multi-threaded domain status checking in Java

I'm tinkering with the idea of crafting a search engine in my spare time. More of a learning experience than anything at this point, but still a project. A key aspect of this system is checking ...
3
votes
1answer
123 views

URL link SEO and security using Laravel

I'm trying to figure out what the best way to do this is. I have a part on my website where people can search for a particular card based on multiple different factors. Like the name of the card, ...
2
votes
1answer
37 views

Generating URL and status for an S3 bucket

The following program generates the S3 URL and response (status code?) for the key, provided the bucket name and if the S3 URL is a mess (wrong url), then it generates empty string as URL and error as ...
2
votes
1answer
68 views

Intercept URL containing values or not

I need to intercept a URL and go outside the WebView if the URL contains MAPS or DOCUMENTS ...
10
votes
3answers
673 views

Constructing a query string using StringBuilder

I speedily wrote a bunch of crappy checks, to check whether strings are empty, in order to build a query string. ...
6
votes
1answer
261 views

Routing for a Laravel 5 e-commerce site

I am new here and learning Laravel 5 on my own. I want to get reviewed on the following routes.php code. My question are: Have I made any mistakes by doing this? If yes, then what could be the ...
2
votes
3answers
108 views

Object to query string

An object (POJO) holds query arguments and has two-binding to a form using some MVC framework. later the object needs to be converted to a query string that will be appended to an HTTP request. ...
3
votes
2answers
69 views

Parsing a URL from a document and matching it from an array

I need help in improving this script that I have written to parse a URL and check it from an array. This is what I have done till now: (fiddle) This is working fine. Was this done correctly? What ...
1
vote
1answer
155 views

Simple, functional URL parsing library in Clojure

I recently wrote some code to handle parsing of URLs, even if those URLs might not be one hundred percent perfectly well-formed. (This constraint made using Java's ...
1
vote
1answer
66 views

Generate URLs for images hosted on Google Drive

The brief is to be able to generate links to artwork files and PDFs easily and quickly without having to use a browser. I have added an image box which shows the user the image upon clicking one. The ...
0
votes
1answer
26 views

Dynamic building of URLs

I'm teaching myself Python and wanted to share this problem as my current solution feels inelegant but I'm not sure of the best way to refactor. If this sort of question isn't appropriate, leave a ...
3
votes
2answers
41 views

Registering endpoints and HTTP method for exemption of authentication

I have a set of API endpoints where the URL is not standardized, so I could either get "api/auth" or "api/auth/" (may or may not end with "/"). I'm 'registering' the endpoint, plus the HTTP Method ...
1
vote
2answers
91 views

Match all youtube links in a string of text

I'm looking to pull all the youtube links from a string of text and was wondering how does this look? ...
4
votes
2answers
93 views

Extracting a number from provided URLs inside a text file

I need to extract a ID (int number) from a Url. Example: http://www.example.com/foo/bar/12345 For this I wrote 4 methods where the first one ...
6
votes
1answer
71 views

Getting a value from a query string

I have a URL in this format: http://localhost:57279/AssociateCaseDetails?UId=176948&caseID=1123 I need the values of UId ...
3
votes
1answer
240 views

Java class that generates a short URL string for an input string

Help me find out if the approach I took to generate random strings here is correct to be able to return the appropriate short URLs. ...
6
votes
2answers
61 views

Extracting information from a URI

I'm completely new to C and my first project is to create a simple cURL-like HTTP request client... but first, I need to create a function that can parse a URL. I've created this function, and it ...
3
votes
2answers
1k views

Update URL with new parameter value

I needed a way to update a parameter in the URL, or add it if it doesn't exist, but keep any other variables the same value. I built this function to do the task, and while it works, I feel like it's ...
1
vote
1answer
61 views

Hash read/write/delete functions

Here is my JavaScript function to manipulate the hash: ...
1
vote
1answer
126 views

Passing an array in a hyperlink

Maybe this is fine the way it is, but it seems messy. Basically I have dynamically generated HTML that will display a list of songs in a given folder. Each song has an ID, and I want to add a button ...
7
votes
1answer
346 views

Download a file from given URL and retry on connection errors

I wrote a script for Python 2.78 which is supposed to download and save a file from a given URL using the requests library. In case that a connection to the server can be established and a valid ...
6
votes
2answers
259 views

Checking for existence of URL parameters

I'm busy rewriting some from my spaghetti code into OOP classes. I'm still learning OOP and very new to the concept. From help from this answer from @EliasVanOotegemto on a previous question I've ...
1
vote
1answer
126 views

URL checker is very slow

I have +-645 IRL links I need to validate. The code below is my attempt, but my problem is that it takes forever to check all links and sometimes times out. Is there a better way of validating so many ...
5
votes
1answer
166 views

Regex to parse URIs for their correctness according to RFC 3986

I recently came to write a regex to parse URIs. Now I wonder, did I miss something? Did I make a mistake or could I have written it cleaner? That's why I'm here. In order to write the regex, I took ...
4
votes
3answers
160 views

Searching for a string in a downloaded PDF

This code goes to the website containing the PDF, downloads the PDF, then it converts this PDF to text. Finally, it reads this whole file (Over 5000 lines) into a list, line by line, and searches for ...
0
votes
2answers
87 views

Remove parameters from string containing URL

Is this the best way to remove URL parameters from a string containing an URL? ...
1
vote
1answer
271 views

Executing URL using Apache HttpClient

I have XML below which is stored as a String in xmlData variable and I need to pass this String to my URL in ...
1
vote
1answer
31 views

Appending URL parameters to links

I've got some pages that may or may not load with a ReturnUrl parameter, and some links that will be generated without that parameter (though I've applied a class to them). The site uses jQuery, and ...
2
votes
1answer
132 views

PHP login redirect security

I wish to redirect users to the login page if they attempt to visit a page which requires them to be logged in. After logging in, however, I want to redirect the user back to their original ...
3
votes
1answer
414 views

Nginx Alias vs Rewrite

I have two working configurations that, on the surface, seem to do the same thing. They both accomplish the functionality that I need: ...
4
votes
0answers
123 views

Parsing URLs in Pandas DataFrame

My client needs their Google AdWords destination URL query parsed and the values spell checked to eliminate any typos ("use" instead of "us", etc). I'm pulling the data using the AdWords API and ...
1
vote
0answers
45 views

Safely include requested pages without a whitelist

Is this pretty safe from breakout attempts? I'd rather not make a whitelist and check if the requested page is in the array since theres a ton of pages. And I wanna keep it clean. So I'm looking for a ...
4
votes
1answer
61 views

Parsing prospero parameters

Prospero is a URI scheme. There you have fields and values. Could you check this code and give common suggestions or even test cases for JUnit tests? (The documentation is in German.) ...
6
votes
2answers
1k views

Parallel “wget” in Java

Purpose: write Java program that downloads a list of URLs specified on commandline in parallel (simultaneously), reporting download completion every second. My solution follows below, please point ...
3
votes
2answers
93 views

Create nice url with diactrics removal

Please review my class. It uses iconv() (it's probably not the best solution however I haven't found any better alternative to change unknown characters). ...
3
votes
2answers
119 views

Pagination filtering

I want to check if there is page variable (in URL) and if it is, if it's correct - it cannot be number 1 because this is default page and it should be valid int ...
8
votes
2answers
375 views

Serializing JSON data coming from two URLs in the same object

I have two URLs (urlA and urlB) and both the URL gives me a JSON response back in the same JSON format. Below is my JSON string ...
3
votes
1answer
49 views

Showing the domain of a URL

I have such a method which takes a URL, such as http://twitter.com/ttt or twitter.com/dasd, and should show its domain with http: http://twitter.com and name twitter ...
6
votes
2answers
247 views

Simple python script to shorten URLs in specified text files

A recent question inspired me to write a script for this task: Shorten URLs in specified text files using googleapis.com Handle multiple URLs, whether on the same line or multiple lines The ...
12
votes
2answers
853 views

PHP URL Shortener

I just developed a URL shortener. index.php: ...
6
votes
1answer
279 views

Git commit-msg URL shortener

I have just written my first git hook script. It is very simple that simply finds any URLs in the commit message and uses the Google URL shortener to rewrite the URL nicely. it is located here. I ...