url

JQuery URL Validator

All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a text box that has a URL. I want to write a function which takes the textbox value, uses the jquery's validator plugin to validate urls and returns true or false. Something like Ex: function validateURL(textval) { /...

Can an URL shortener pass parameters?

Hi, I use bit.ly to shorten my urls. My problem - paramters are not passed. Let me explain I use http://bit.ly/MYiPhoneApps which redirects (let's say) to http://iphone.pp-p.net/default.aspx Now when I try http://bit.ly/MYiPhoneApps?param=xx this param is not added to the resulting url. I know I could create an extra "short url" includi...

Efficiently check string for one of several hundred possible suffixes

I need to write a C/C++ function that would quickly check if string ends with one of ~1000 predefined suffixes. Specifically the string is a hostname and I need to check if it belongs to one of several hundred predefined second-level domains. This function will be called a lot so it needs to be written as efficiently as possible. Bitwis...

Javascript for conditional URL append or redirect based on window.location.href

I am trying to make a bookmarklet that when clicked will check the URL of the current tab/window to see if it contains 'char1' and/or 'char2' (a given character). If both chars are present it redirects to another URL, for the other two it will append the current URL respectively. I believe there must be a more elegant way of stating thi...

how to merge multiple url/path into multidimensional array ?

I have array like this: $path = array ( [0] => site\projects\terrace_and_balcony\mexico.jpg [1] => site\projects\terrace_and_balcony\new_york.jpg [2] => site\projects\terrace_and_balcony\berlin.jpg [3] => site\projects\terrace_and_balcony\Kentucky.jpg [4] => site\projects\terrace_and_balcony\Utah.jpg [5] => site\projects\terrace_and_bal...

How can i make a gallery with web images from my website?

I currently have two codes that i am trying to figure out how to mix or write a new code to have a gallery with image doing fill_parent but i can slide sideways to see the other url linked images from my site. here are both parts of code i have: package com.mandarich.gallerygrid; import java.io.InputStream; import java.net.URL; import ...

Which's the best way to protect primary key on ASP.NET MVC?

I'm creating a ASP.NET MVC website and I was wandering which techniques do you guys use to protect primary key on these mvc urls. Actually ASP.NET MVC generates this syntax for its urls: /Controller/Action/Id Last week I was trying to encrypt it using SHA-1 Encryption, but this encrypter generates some special symbols like + (plus), ...

Why do websites generate random alphanumeric strings for urls instead of using row ids?

Why does many sites (youtube is good example) generate string of random number and letter instead of using for example the row id? usually its something likes this bla?v=wli4l73Chc0 instead of like bla?id=83934 Is it just to keep it short if you have many rows? Or is there other good things about this? Because i can imagine: bla?...

Add / remove a port number to/from a URL with REGEX in PHP

Hello guys, I've searched but was unable to find an existing regex function. Has anybody done this before? I wish to add a port number, or remove a potantially existing one from a url in php. To use in some functions which translate a given url to the secure one, unsecure one, etc. Now I need a second SSL secured site on the server so...

Is this a valid url parameter in jquery.ajax()?

Is this a valid url parameter in jquery.ajax(), <script type="text/javascript"> $(document).ready(function() { getRecordspage(); }); function getRecordspage() { $.ajax({ type: "POST", url: "http://localhost/codeigniter_cup_myth/index.php/adminController/mainAccount", data: "", contentType:...

how to show image from url facebook application?

on googling i found this code facebook.fbml.refreshImgSrc('imgURL') how to use this code with cakephp.. ...

Modify request querystring paramaters to build a new link without resorting to string manipulation

Hi All, I want to dynamically populate a link with the URI of the current request, but set one specific query string parameter. All other querystring paramaters (if there are any) should be left untouched. And I don't know in advance what they might be. Eg, imagine I want to build a link back to the current page, but with the querystri...

Problem resolving URL for a Script Tag in an ASP.NET app in the Intranet

I have this piece of code: Page.ClientScript.RegisterClientScriptInclude(this.GetType(), Guid.NewGuid().ToString(), this.ResolveUrl("~/Scripts/min.js")); When we push to our QA server - http://qa.example.com - it works just fine, but when we push to an address in the intranet - http://intranet/app - it won't find the script. Any sugg...

URL Navigation in an AJAX Based Website?

I would like to develop a website with fully ajax navigation, but this means that users cannot share, bookmark, or go straight to certain content. I noticed a few websites (Gmail, Thesixtyone, Youtube) are using hash tags to create custom urls for different page configurations. What is this technique called, and how can I implement thi...

Symfony 1.4: Is it possible to prevent escaping of a redirect URL?

Hi, If I do a redirect in action as normal: $this->redirect('@mypage?apple=1&banana=2&orange=3'); ... Symfony produces the correct URL: /something/something?apple=1&banana=2&orange=3 However, the following gets escaped for some bizarre reason: $string = 'apple=1&banana=2&orange=3'; $this->redirect('@mypage?'.$string); ... and t...

How do I write this URL in Django?

(r'^/(?P<the_param>[a-zA-z0-9_-]+)/$','myproject.myapp.views.myview'), How can I change this so that "the_param" accepts a URL(encoded) as a parameter? So, I want to pass a URL to it. mydomain.com/http%3A//google.com Edit: Should I remove the regex, like this...and then it would work? (r'^/(?P[*]?)/?$','myproject.myapp.views.myvie...

How do I use regex to do this in Python?

def symbolsReplaceDashes(text): I want to replace all spaces and symbols with hyphens. Because I want to use this with URL. ...

http url input parameters

Is this a valid http url http://www.example.com?x&amp;y or we must always have = sign for parameters. http://www.example.com?x1=x&amp;x2=y ...

how to get the last word ('wwww') of this url using javascript

the url is "http://127.0.0.1:8000/maps/map/wwww/' how to get the last word thanks ...

How to use ';' in urls, using Google Appengine

Using the local dev server, I can use ';' in urls, but as soon as I try the live version hosted by Google, it looks like the ';' and everything afterward is stripped (at least according to request.path_qs). (I would prefer not to encode them if possible, it's much less user friendly if the url cannot be constructed by copy-pasting, espe...