url

How to check if a webpage exists. jQuery and/or PHP

I want to be able to validate a form to check if a website/webpage exists. If it returns a 404 error then that definitely shouldn't validate. If there is a redirect...I'm open to suggestions, sometimes redirects go to an error page or homepage, sometimes they go to the page you were looking for, so I don't know. Perhaps for a redirect th...

Targeting a specific string within Json array while decoding

Hi, I need to decode and specifically target the first url only in this array: [{ "longDateTime":"3:00pm Saturday 21 August 2010", "shortDateTime":"3:00pm Sat", "url":"\/Pics\/ob\/7d778-127a9294cec0-12a929779a2b.Img.jpeg" },{ "longDateTime":"2:00pm Saturday 21 August 2010", "shortDateTime":"2:00pm Sat", "url":"\/Pics\/ob\/7d778-12a9275d...

DB query and quotes

If I use http://site.com/index.php?page=45 everything looks ok (wanted page loads). But when I go through http://site.com/index.php?page=45' or http://site.com/index.php?page=45" (quotes are added after digits) page prints an error: Unhandled Exception (Debug) You have an error in your SQL syntax; check the manual that corresponds to y...

#hash added by firefox and ie at the end of url in search-results page (Google personal search)

is there any way to avoid firefox and ie to reload the page adding the hash-tag to the url. due to that i refine results by time with adding &as_qdr=d to the end of url, i have a problem with theese hashtags in url, because anything behind them seems to be unfunctional. It does not happen with Chrome, but Firefox reloads the page after...

#hash added by firefox and ie at the end of url in search-results page (Google personal search)

is there any way to avoid firefox and ie to reload the page adding the hash-tag to the url. due to that i refine results by time with adding &as_qdr=d to the end of url, i have a problem with theese hashtags. It does not happen with Chrome, but Firefox reloads the page after query adding this nightmare hash d?=¿)a¿?)!!m!!"!"·n I am t...

Passing a URL as a GET parameter in Javascript

I am trying to make a bookmarklet that uses the user's current URL, kind of like the tinyURL bookmarklet that uses this javascript code javascript:void(location.href='http://tinyurl.com/create.php?url='+location.href) So I copied that same thing and made javascript:void(location.href='http://mywebsite.com/create.php?url='+location.hr...

Update MySQL Value Through Img Src Variable Including jQuery

Thank-you to all who have helped me over the last few days.. Unfortunately I was working so I couldn't get back to you. I have included some code into what I thought would work, but for some reason the below code will not update in my SQL Database. I will provide the code and it's output if someone could please copy the code and see wh...

Codeigniter arbitrary length URI

In codeigniter I am trying to make an application which will accept a URI of an arbitrary length, such as: http://example.com/files/some/arbitrary/length/uri In the routes.php file i have the following rule to get the first URI segment: $route['files/(:any)'] = "files/uri/$1"; How would I be able to get the rest of the address as a...

How to get RouteData by URL?

I need to get RoutData by given URL string in ASP.NET MVC application. I've found the way that I need to mock HttpContextBase based on my URL string and then pass it to RouteTable.Routes.GetRouteData() method in Route Parsing (Uri to Route) thread. How to mock HttpContextBase to retrieve RouteData by URL string using RouteTable.Routes....

validate URL in form http://www.test.com

Hi, I want to validate URL (using java script) to accept only format - http://www.test.com. I'm trying following code, but it accepts test.com and http://www.test.com.com also. var URLReg = new RegExp(); URLReg.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$"); if (!URLReg.test(form["URL"].value)) { alert("You must su...

Can I reformat my URL parameters with Varnish

Hello, I have a relatively simple (I think) use-case but I can't find any examples where someone has done this. We are using Varnish as a cache and reverse proxy in front of two different applications and would like to make things a bit more unified across both as they both do similar things. I was hoping Varnish could help rewrite the U...

URL Routing not working when set as Virtual directory under IIS.But works in VS IDE

I have an ASP.NET web application(WebForms,Not MVC) developed in VS 2008 and i have implemented ASP.NET web forms URL routing by following this link http://www.4guysfromrolla.com/articles/051309-1.aspx#postadlink It works pretty good when i run it on the Visual studion IDE.But does not works when i created a site under my IIS (IIS 5.1 i...

URL Routing,cleaner urls without id

HI All, I got a question about the URL Routing feature in .Net 4.0 My URL the I want to rewrite is : www.mysite.com/counties.aspx?id=12 I could make it work like that : www.mysite.com/12/egypt But I want it to work without passing the id of the country in the query to look like this www.mysite.com/egypt So ,I want to know how can I p...

SEO friendly URL

Which is more seo friendly URL from below http://www.example.com/products/market-reports http://www.example.com/products/market-reports.aspx Can anyone help? ...

Issue creating "custom" user URLs

I am running into the following issue: Our members have a desire for personalized sites directly from our primary domain in the form of http://www.example.com/membername. I am looking at possibly solutions in two ways but neither are ideal (will be explained below). Method 1 - ?Member= In this method, I simply create a custom URL and...

ruby on rails get url string parameters

I have this url in my database, in the "location" field: http://www.youtube.com/watch?v=xxxxxxxxxxxxxxxxxxx I can get it with @object.location, but how can I get the value of v? I mean, get "xxxxxxxxxxxx" from the url string? Thanks and Regards. ...

What's the easiest way to put a URL link into a UITableViewCell

I have some text in a UITableViewCell that has a URL link to it. I'd like to make the URL blue and, when clicked, open up the Safari Browser. Some of suggested that I use a UIWebView within the UITableViewCell, but I've not seen a simple implementation of that. I don't care about scrolling as I only have one row in this table (it is a...

[REST] is it bad form to have the colon in db and in the URL?

I am designing my namespace such that the id i am storing in the DB is id -> "e:t:222" where "e" represents the Event class, "t" represents the type i am also expecting to use this id in my urls url -> /events/t:222 Is there anything wrong with doing this? ...

how to get the Anchor from the url using jquery .

the url is : www.aaa.com/task1/1.3.html#a_1 so how to get the 'a_1' using jquery thanks ...

RESTful URLs: "Impractical" Requests, and Requiring One of Two Request Parameters...

I have a RESTful URL that requires either the offset or the prefix request parameter (but not both). GET /users?offset=0&count=20 GET /users?prefix=J&count=20 What's the best way to enforce this rule? Spring has the @RequestParam annotation with the 'required' property for optional parameters, but I want to enforce an "either-or" rule...