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.

Filter by
Sorted by
Tagged with
5
votes
1answer
2k views

Presenting long string literals (URLs) in Python

I have a web scraping application that contains long string literals for the URLs. What would be the best way to present them (keeping in mind that I would like to adhere to PEP-8. ...
6
votes
1answer
188 views

Image-downloader/wallpaper setter

I'm making an image-downloading app that sets the image as the device wallpaper. For this I used the class: ImageDownloader.java This class has a function which ...
2
votes
2answers
1k views

PHP creating slugify (clean URL) links in simple way?

I think this is the simplest way to slugify urls. You have any contra-indication? ...
3
votes
1answer
221 views

Setting a page number from the URL, with fallbacks

I have the following code, but it somehow looks a bit redundant. As I am new to ColdFusion, I am not sure how to optimize it. Can someone suggest an alternative? ...
5
votes
2answers
28k views

Hiding $_GET variables using encryption

I use the following functions to encrypt my $_GET variables (whenever I can't easily get away with using $_POST or some other ...
3
votes
1answer
18k views

HTTP URL validating

What do you think about this? ...
7
votes
1answer
270 views

Canonicalize URLs for static website

I want to "canonicalize" URLs for my static (files and folders) website. The 'Aims' describes what I want to accomplish. The 'Code' gives my current .htaccess. ...
3
votes
1answer
145 views

Simple httpcode monitor

I'm making a simple httpcode monitor as an example for teaching myself PHP OOP. I have written the code below and would be interested in having it improved. In particular, I'm not sure about this ...
4
votes
1answer
7k views

Routing in MVC with PHP

I am in the progress of creating a MVC structured website. I've opted to make my own instead of using pre-constructed MVC systems as a way to teach myself better coding and understanding how ...
15
votes
2answers
23k views

Joining url path components intelligently

I'm a little frustrated with the state of url parsing in python, although I sympathize with the challenges. Today I just needed a tool to join path parts and normalize slashes without accidentally ...
7
votes
2answers
4k views

Custom Authentication Attribute

I was trying to find a way to redirect to different pages on authorization and authentication failure. I found this to be a possible solution. However, I ended with a different solution by myself. It ...
1
vote
1answer
274 views

Generating filters to remove query variables from a URL

This function takes a URL structure which is most often a query string (but sometimes not) and generates filters to remove query variables from the URL. If you're looking at an archive like http://...
8
votes
3answers
687 views

Function for getting URLs

This is a simple Python program I wrote. I hope some one could help me optimize this program. If you found any bad habits, please tell me. ...
0
votes
1answer
3k views

Change URL on select change

I've made a method, which inserts a new query parameter, when the value of a select changes, then reloads the page. I've had enough of URL jQuery hax, so I figured it would be a great idea to put the ...
2
votes
2answers
383 views

Parse in currency rates of major cities

I'm creating a website that parses in currency rates of the three major cities listed below in the $cities array. ...
3
votes
2answers
739 views

Configuring a currency converter to get exchange rate feeds for for multiple currencies

I'm trying to make my function more versatile by removing hard coded data. ...
1
vote
0answers
171 views

Optimizing URL router behaviour

I'm trying to create an URL-router, where the website language is defined by the first two chars in the domain. Example: domain.com/en (the site will then display content in English). The script ...
2
votes
2answers
232 views

Query string substitutions for links on a page

If the current page URL has an argument 'myid1' or 'myid2' in the querystring, for each link in my webpage with class 'rewrite', I want the link href's querystring to be replaced by the current page ...
2
votes
1answer
174 views

Scraping PubMed query results: follow-up

I recently posted a question looking for feedback on a script I wrote (see: Scraping PubMed query results) Since then I have re-written it into a class, which I have posted below. How does it look? ...
1
vote
1answer
576 views

Scraping PubMed query results

How can I make the following PHP code better, more efficient, shorter, elegant, etc? While it already works, I am still learning PHP and want to improve upon my current code: ...
5
votes
3answers
220 views

Issue a redirect, trying several string replacements for the domain

How could I improve this code? ...
5
votes
1answer
548 views

Redirect incoming traffic based on referrer or random number

This working script directs incoming traffic to different locations depending on the value present in the session for referring URI. If there is a present value, it sends the user back to their ...
2
votes
1answer
386 views

Function to convert a title to a slug

I'm creating a function that converts a title, to a URL slug. I'm not all to familiar with regular expressions, but I've done my best. Can you see any problems or improvements with the following ...
11
votes
1answer
21k views

Get params from a URL

I want to write my own version of HttpUtility.ParseQueryString, because it is not included in the .NET Framework Client Profile. My code is pretty straightforward ...
12
votes
2answers
699 views

HTTP request path parser

I have written a method to tokenize HTTP request paths such as /employee/23/edit: ...

1 2 3 4
5