url

Using custom Data Service Providers, do I have any control over URLs that are returned?

I'm implementing several custom Data Service Providers in WCF Data Services: IDataServiceMetadataProvider IDataServiceQueryProvider IDataServiceUpdateProvider To illustrate the point of my question consider this made-up example: I have a resource called "Employee," which can be addressed in the following ways: MyDataService.svc/Em...

What's the best method to capture URLs?

I'm trying to find the best method to gather URLs, I could create my own little crawler but it would take my servers decades to crawl all of the Internet and the bandwidth required would be huge. The other thought would be using Google's Search API or Yahoo's Search API, but that's not really a great solution as it requires a search to ...

Visual Studio/ Asp.net / IIS Pathing Help

Hey guys, I am having some serious pathing issues with a website that I am creating. I am using Visual Studio 2008 IDE with IIS7 on Windows Vista Home Premium. This is a website project and not an asp.net web application (according to Visual Studio). Well here is the problem. I am using IIS 7 as a test server, even though VS 2008 h...

I am trying to determine if a string is a Question. How can I analyze the "?" symbol (python)

This is a question: "Where is the car?" This is NOT a question: "Check this out: http://domain.com/?q=test" How do I write a function to analyze a string so that we know for sure it is a question and not part of a URL? ...

What's the quickest way to get a list of URLs for a Google search?

How do I extract a list of the URLs for a Google Search results page? ...

Extract part of an url using a bookmarklet or similar (e.g. firefox addon)

Does anybody know of a bookmarklet or firefox addon that let's you extract part of an url. Specifically I want to extract the message id from a gmail conversation. Every message in gmail has a unique ID. The url may look like this: https://mail.google.com/a/domain.com/#all/1251b8f40722a3c2 What I want, is to be able to extract the last...

Extract URLs out of email in Python

Dear Sam Adams Thanks for your submission to ourdirectory.com URL: http://myurlok.us Please click below link to confirm your submission. http://www.ourdirectory.com/confirm.aspx?id=1247778154270076 Once we receive your comfirmation, your site will be included for process! regards, http://www.ourdirectory.com Thank you! Should be ob...

How to join components of a path when you are constructing a URL in Python

For example, I want to join a prefix path to resource paths like /js/foo.js. I want the resulting path to be relative to the root of the server. In the above example if the prefix was "media" I would want the result to be /media/js/foo.js. os.path.join does this really well, but how it joins paths is OS dependent. In this case I know...

content URLs regexp

I receive a block of code from db which occasionally contains urls, e.g, http://site.tld/lorem.ipsum/whatever Now I want to turn this into nice clickable link for the user, with a helper method. Such as: <a href="http://site.tld/lorem.ipsum/whatever"&gt;http://site.tld/lorem.ipsum/whatever&lt;/a&gt; Of course, anyone can do this, [^\s...

URL Escaping Chinese/Japanese Unicode Characters for Internet Explorer

I'm trying to URL-escape (percent-encode) non-ascii characters in several URLs I'm dealing with. I'm working with a flash application that loads resources like images and sound clips from these URLs. Since the filenames can contain non-ascii characters, like so: 日本語.jpg I escape them by utf-8 encoding the characters, and then percent-esc...

SQL Injection Vulnerability found

Hello All, Yesterday i received an email from a guy that our site is vulnerable to SQL injection. The email said: I tried some classic SQL injection on your server. This URL contains the result: http://www.mysite.com/ppreview.php?id=611111161%20and%201=0%20UNION%20all%20SELECT%201,2,3,4,password,6,7,8,9,10,11,12,13,14,15,16...

Django reverse() for JavaScript

In my project I have a lot of Ajax methods, with external client-side scripts (I don't want to include JavaScript into templates!) and changing URLs is kind of pain for me because I need to change URLs in my Ajax calls manually. Is there is some way to emulate the behavior of {% url %} templatetag in JavaScript? For example, print ur...

Path part gets overwritten when merging two Uri

I need to combine two url's that both contain .Path info. I would like to use Uri to give me possibility to .TryCreate() so i can catch malformed url's. The problem that im facing is that the base uri path seems to be ignored when i merge the absolute and the relative uri: Uri absoluteUri= new Uri("http://hostname/path/", UriKind.Abs...

Regular Expression to match a string only when certain characters don't exist

So, here's my question: I have a crawler that goes and downloads web pages and strips those of URLs (for future crawling). My crawler operates from a whitelist of URLs which are specified in regular expressions, so they're along the lines of: (http://www.example.com/subdirectory/)(.*?) ...which would allow URLs that followed the patt...

Regex Problem (newbie)

hi all, i'm writing a little app for spam-checking and i'm having problems with a regex. let's say i'm having this spam-url: http://hosting.tyumen.ru/tip.html so i want to check its url for having 2 full stops (subdomain+ending), a slash, a word, full stop and "html". here's what i got so far: <a href="(http://.*?\..*?..*?/.*?.htm...

C++ HTTP Library

Is there a good open source library in C++ which will allow me to grab the contents of an URL (the response to a POST or a GET, like a web service's response) to a string? ...

Possible Root URLS

When validating URLs, I was wondering if the root could be setup like this: http://my.great.web.site.I.rule.com/ I guess the real question is, if someone wanted to buy a .com with the name "some.site", would the above example be possible? I was thinking something like that was out of the ordinary, and that the maximum would be someth...

Problems with ASP.NET MVC Deployment

Hi all, I'm just a beginner in ASP.NET technologies and a starter about C# though I've experiences over Apache and PHP. Now, I'm on a project that use ASP.NET MVC. Although it works fine while using aps.net deployment server, I became just like a fool when I try to deploy over IIS Server. Honestly saying, I really did follow the instru...

Best practises to convey parameters from JavaScript (jQuery) to a Java based REST service?

I have made a jQuery based widget which is configured a bit like this: jQuery("#foo").widget("service", { output : "test_output_field", parameters : {'format' : 'json', 'limit' : 20, 'services' : {'service1' : {}, 'service2' : {'language' : 'en', 'type' : 'solid', 'parent' : 'father'}, 'service3' : {...

Using mod_rewrite to work with a custom string

I want to rewrite everything that uses this pattern... /test/?TEXT=TRUE and allow it to be /test/TEXT AND /test/TEXT2, and so on. ...