url

Absolute URL Path for PHP Website

Hi friends, I am working on a website in a CMS site. I have provided a link in my footer file e.g blogs.php. This page is at the root like "http://www.example.com/new_cms/blogs.php" When I moves to other files link like "http://www.example.com/new_cms/forums" the footer link is changed to "http://www.example.com/new_cms/forums/blogs.ph...

iTunes search query URL?

I'd like to make a URL that searches my name in iTunes. Basically, clicking on it should open up iTunes with my name in the search box and the results should be loading or loaded. How do I make this URL? ...

Convert url for crawler

Hi.. I'm working on a crawler. Usually, when i type url1 in my browser, browser converts it to url2. How can i do this in Python? url1: www.odevsitesi.com/ara.asp?kelime=doğanın dengesinin bozulması url2: www.odevsitesi.com/ara.asp?kelime=do%F0an%FDn%20dengesinin%20bozulmas%FD ...

routing mvc on the web

Hi, I was wondering if anyone could possibly provide me some advice on how i could improve the routing (and/or architecture) to each 'section' of my application. (I'm writing in PHP5, and trying to use strict MVC) Basically, I have a generic index page for the app, and that will spew out boilerplate stuff like jquery and the css etc. ...

How to change URL in the address bar of a browser?

Hi I bought to domains, let's say a.com and b.com. Then I also bought some webspace from a hoster. The domain a.com is pointing to the top level folder of my webspace (/). The domain b.com points to a folder on level deeper (/folderB). Now if I'm using the domain b.com to access /folderB it works as intented. Then I installed a small C...

Automatic scroll to div using #div in url not working with url variable

I am trying to autoscroll to div using: /index.php#tabletabs2?contact_added=1 when I use: /index.php#tabletabs2 it works. How can I have both a variable and the autocroll working in my URL??? ...

Java resource closing

Hi, I'm writing an app that connect to a website and read one line from it. I do it like this: try{ URLConnection connection = new URL("www.example.com").openConnection(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); String response = rd.readLine(); rd.close...

Whats the best way to send multiple variables in a query string within a URL

I have a client who is wanting to create a link which contains product codes so that his customers hit a page with just those products displayed in an attempt to increase conversion rates from affilliate sites. My question is whats the best way to send these multiple products in a single URL For example: http://www.mydomain.co.uk/besp...

jQuery Validation addMethod - Check if same domain

I'm trying to check whether a URL is from the same domain with jQuery Validation addMethod. Here's what i got so far, but it doesn't seem to be working: jQuery.validator.addMethod("domain", function(value, element) { return this.optional(element) || /^http:\/\/testsite.com/.test(value); }, "The URL doesn't match."...

Is there a faster way to download a page from the net to a string?

I have tried other methods to download info from a URL, but needed a faster one. I need to download and parse about 250 separate pages, and would like the app to not appear ridiculously slow. This is the code I am currently using to retrieve a single page, any insight would be great. try { URL myURL = new URL("http://www.google.co...

Need help with Zend Framework dynamic Namespaces

I want to make my system redirect unknown requests such as www.address.com/a_company to the adress www.address.com/companies/company/ and display the company a_company if it exists in the database, otherwise throw the user to a 404 not found page. So in detail, I want to make namespace that is as the first example dynamically, if the c...

automate finding all images used by webpage

When I load a page with Firebug I can see a list of all the images required by the site. How can I automate finding a list of the image URLs used by a webpage, including those referenced in external CSS? ...

Mod_Rewrite: Testing URL got indexed in Google - How do I create a proper 301 redirect?

I worked on a website for which I had a "development URL" that looked something like this: www.example.com.php5-9.dfw1-2.example.com/ Now, several weeks after the website launch, there is at least one page of content indexed on Google with that URL. Question: How do I redirect all requests from that test URL to reroute to the actual ...

Can I open a URL from android Live Wallpaper?

Hi, I'm new to android... having trouble trying to open a URL from a live wallpaper.. Code to open the url: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); Activity activity = new Activity(); activity.startActivity(intent); But I just get a Nullpointer...

Getting values from any URL

Hey, I have this url : http://localhost:49500/Learning/Chapitre.aspx?id=2 How can I get just the value of id in this url ? ...

Is it safe to validate a URL with a regexp?

In my web app I've got a form field where the user can enter an URL. I'm already doing some preliminary client-side validation and I was wondering if I could use a regexp to validate if the entered string is a valid URL. So, two questions: Is it safe to do this with a regexp? A URL is a complex beast, and just like you shouldn't use a ...

what's the story with the android XML namespace?

When you first use a name from the android XML namespace, you have to say where to find it, with an attribute in XML like this: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" However, that URL is a 404 - nothing found there. The android: namespace is actually included under the locally-installed SDK. So wha...

Getting SharePoint absolute site url

I need to get the current absolute url of my site from inside an aspx page (no codebehind). I tried $SPUrl, but it get's converted into a relative url. <asp:Literal runat="server" text="<% $SPUrl:~Site/mypage.aspx %>" /> results in "/mypage.aspx". It's important that I get the full absolute url starting with "http://". <asp:Literal r...

Trailing slashes: yes or no?

Hello. I'm working on a new project, using Apache's mod_rewrite and PHP to get pretty URLs. Here's what my URLs look like: http://example.tld/foo/bar/1/etc Notice that there's no trailing slash (that's the way I write it in the href attributes of <a>s). However, I'm also allowing http://example.tld/foo/bar/1/etc/ (trailing slash). I...

Can anyone help me with this javascript for validating url in aspx?

Here's my code - function Validate_URL(url) { var iurl = url.value; var v = new RegExp(); v.compile("/^(((ht|f){1}(tp:[/][/]){1})|((www.){1}))[-a-zA-Z0-9@:%_\+.~#?&//=]+$/;"); if (!v.test(iurl.value)) { url.style.backgroundColor = 'yellow'; } return true; } no matter what i put in url...