url

need a c# regex to get servername out of UNC

I screwed up my last post. Lets see if I can get this one right.. Would anyone be able to tell me how to pull the server name out of a UNC? (I'm looking for a regex) this is the string I want to pull the servername from: **\\\servername\d$\directory** My Code is in C# Regex r = new Regex(?????, RegexOptions.IgnoreCase); Match m =...

How to get list of URLs for a domain

hello, I would like to generate a list of URLs for a domain but I would rather save bandwidth by not crawling the domain myself. So is there a way to use existing crawled data? One solution I thought of would be to do a Yahoo site search, which lets me download the first 1000 results in TSV format. However to get all the records I woul...

Concept & Algorithm: How to record only single URL for widget?

I have created a widget for my web application. User's getting code and just pasting that code in their website and my widget works on their website something like twitter, digg and other social widgets. My widget is on the basis of post, for a single post (say postid: 234) I am providing single widget, so anyone can embed the widget on...

escaping URL request? ASP.NET C#

I have a request to a page that looks like /doSomthing?a=that&ret=url however now i need to login so i must do something like /login?ret=/doSomthing?a=that&ret=url This doesnt work as well as one may hope so how do i correctly escape the return URL then unescape it? I am using ASP.NET with C# ...

URL of my java class.

Hello, I am trying to find my java class URL in order to use it in a SWT.Browser component. My goal is to display a page located in the same folder as my .java file. If anyone knows how to do it or has a better solution to display a local page in a SWT.Browser I would be glad to know it to ;p Thanks in advance. ...

Ajax in javascript not working.

$(document).ready(function() { $('#content').html(''); $.ajax({ url:'data.json', dataType: "json", success: function(data) { $('#content').append('<p>'+data.rank+'</p>'); } });}); In this code (it works) data.json contains the JSON data in this format: { "user_id":"3190399", "user_name"...

PHP - URL displays fine in Chrome and IE8, but not in Firefox 3.0.11

Hello, My site prints out URLs in a table. In Chrome and IE8, the URLs look great. In Firefox 3.0.11, the URLs only display up until the second forward slash. So for example, "nytimes.com/pages/world/americas/index.html" is just "nytimes.com/pages" in Firefox. Any ideas why? The code is below. Edit: I'm beginning to think this ...

How to give parameters in the url?

The question raised from the question here. In order to have search engines in Browser, I need to find a way to get the parameters to url. Suppose you have Google Sites where you have Google Gadget. The gadget has a search box. How can you give the search parameters to the search box? ...

How do you determine if a file is html from the URL?

Given a URL, how can you tell if the referenced file is and html file? Obviously, its an html file if it ends in .html or /, but then there are .jsp files, too, so I'm wondering what other extensions may be out there for html. Alternatively, if this information can be easily gained from a URL object in Java, that would be sufficient ...

How to generate unique URL variables that match to a db record?

Hello all, I wish to be able to generate URL variables like this: http://example.com/195yq http://example.com/195yp http://example.com/195yg http://example.com/195yf The variables will match to a MySQL record set so that I can pull it out. At the time of creation of that record set, I wish to create this key for it. How can I do th...

Can I pass matched variables to the new URL with mod_rewrite?

I'm quite experienced in PHP but I don't quite use mod_rewrite (although I should). All I want to ask is if it's possible to pass many variables through a single rewrite rule. For example, is it possible to rewrite this: localhost/test.php?id=1&name=test&var1=3 into this: localhost/mysupertest/ and also use the same rewrite rule f...

regex matching image url with spaces

I need to match a image url like this: http://site.com/site.com/files/images/img (5).jpg Something like this works fine: .replace(/(http:\/\/([ \S]+\.(jpg|png|gif)))/ig, "<div style=\"background: url($1)\"></div>") Except if I have something like this: http://site.com/site.com/files/audio/audiofile.mp3 http://site.com/site.com/f...

Python extract domain name from URL

hello, how would you extract the domain name from a URL, excluding any subdomains? My initial simplistic attempt was: '.'.join(urlparse.urlparse(url).netloc.split('.')[-2:]) This works for http://www.foo.com, but not http://www.foo.com.au. Is there a way to do this properly without using special knowledge about valid TLDs or country...

URL for a resource located on the local machine in REST ROA

This question is in terms of a RESTful ROA (Resource-Oriented Architecture). A resource on the Web has a URL (or URI if you prefer), for instance http://myserver.com/me.jpg. You can get a file on the local (Windows) machine like this: file:///C:/MyPictures/me.jpg. This is not exactly a "Universal" Resource Identifier; it doesn't work...

urllib.urlopen isn't working. Is there a workaround?

I'm getting a getaddress error and after doing some sleuthing, it looks like it might be my corporate intranet not allowing the connection (I'm assuming due to security, although it is strange that IE works but won't allow Python to open a url). Is there a safe way to get around this? Here's the exact error: Traceback (most recent cal...

Refresh image with a new one at the same url

I am accessing a link on my site that will provide a new image each time it is accessed. The issue I am running into is that if i try to load the image in the back ground and then update the one on the page I only get the same image. If i refresh the entire page then the image is updated. var newImage = new Image(); newImage.src = "ht...

Passing parameter via url to sql server reporting service

I'm trying to pass a parameter via the url to SSRS and it appears not to work! I'm trying to pass a userId (string) via the url which will be passed to the database and used by the query. base url: http://blah/Reports/Pages/Report.aspx?ItemPath=MyReport tried this but it doesn't work: http://blah/Reports/Pages/Report.aspx?ItemPath=MyR...

Creating an mailto: URL with a URL in the body iPhone SDK

UPDATE: I just found a similar post here: http://stackoverflow.com/questions/730101/how-do-i-encode-in-a-url-in-an-html-attribute-value Please consider the code below: I try to send an email message from within my iPhone app. The problem I encounter is that I want to put a URL in the body of the email. This URL contains two ampersands. ...

Linking to an external URL in Javadoc?

Something like: /** * See {@linktourl http://google.com} */ ...

Can a browser correct a "mangled url" automatically?

Hello, I faced a problem some time back on a particular website. It has given many hyperlinks on it to other sites. e.g. of one such URL is: http://http//example.com/a9noaa.asp It is clearly incorrect (http comes twice) URL so when one clicks on it there is a page error like "Address not found". But when one copies the link location...