url

Add a value to a delete link in Rails?

I currently have the following link_to in my Rails application: <%= link_to 'Remove this Person', @person, :confirm => 'Are you sure?', :method => :delete, :class => 'important', :class => "minimal important" %> I would like to add the person's name in place of the "this person" for the link. I don't appear to be able to do: <%= lin...

Reserve the App Market URL in advance

We are currently developing an android app for our client. Client would like to include a barcode on a it’s mailing about the Android app, such that when the user scans the barcode, s/he will be taken directly to the application on the Android marketplace for download. To do this, client will need to know the exact URL on the marketplace...

How can I fetch the same URL with different query string with Perl's LWP::UserAgent?

I looked up articles about using LWP however I am still lost! On this site we find a list of many schools; see the overview-page and follow some of the links and get some result pages: I want to parse the sites using LWP::UserAgent and for the parsing : want to use either HTML::TreeBuilder::XPath or HTML::TokeParser At the moment I am ...

Can php URLs have numeric parameters?

Is this valid?: http://www.SomeURL.com/Index.php?123=xyz Will I be able to access the value 'xyz' under the key '123' the same ways as usual? ...

C# Determine if Absolute or Relative URL

I have a relative or absolute url in a string. I first need to know whether it is absolute or relative. How do I do this? I then want to determine if the domain of the url is in an allow list. Here is my allow list, as an example: string[] Allowed = { "google.com", "yahoo.com", "espn.com" } Once I know whether its relativ...

How to replace text URLs and exclude URLs in HTML tags?

I need you help here. I want to turn this: sometext sometext http://www.somedomain.com/index.html sometext sometext into: sometext sometext <a href="http://somedoamai.com/index.html"&gt;www.somedomain.com/index.html&lt;/a&gt; sometext sometext I have managed it by using this regex: preg_replace("#((http|https|ftp)://(\S*?\.\S*?))...

Relative path URL problem

Ok. So the problem is here.. on this address i have this url: _http://localhost/blog img src='image/b.jpg' and everything goes fine.. because i have my image in "image" folder... browser asking image with this url "_http://localhost/image/b.jpg" but if i got to: _http://locahost/blog/otherfolder/ then browser start looking for "_htt...

How to hide password in a url

There is a JSP script for login to a Server. Currently user credentials are being accepted through HTTP Header and the login.jsp file is so designed that once the user provides credentials the user is redirected to a redirectURL which is a fully qualified URL containing Username and Password in query string and hence the user is able to ...

Making a .dmg available for download from a website

Good day lovely computer peoples! I've uploaded a .dmg file to my server, but when I test to see if it is downloadable by pointing the web browser to it's place in the directory (i.e. using it's URL) I get a 404. Any possible ideas of why this could be happening? Thanks EDIT 1 I realize that the 404 means that it can't find the it...

how to handle url modifications php/mysql

Hi, I am having a problem in understanding the security issues with the following scenario. I have a site that has user registration and they can create events by logging in. If I am logged in as a user and i am in a url like http://abc.com/index.php?page=edit&amp;pageid=45. I am seeing this page after logging in other wise it will show...

Jave Applet: how to simulate an url has been clicked ?

Hi all: Basically I want my Java Applet to simulate an url has been clicked, once a certain event listener has been executed. Say, before I have a link in html: <a href='destinationpage.php?pid=1001' target='rightFrame' /> I'd like to keep the same link to php intact, and when Applet actually invoke the click simulation method, the ...

Security by obscurity: what about URLs?

first of all, the question from a naive point of view: I've got a WebApplication with a URL to a product like Products?id=123. Let's say I've got an administration page reachable from Products?id=123&editable=true. If I consider that no one will ever try to enable the editable parameter, and thus don't need any further security mechani...

Access specific menu from url in admin area

Is that possible to load an admin page in a browser with settings for some specific menu in WordPress 3? Something like :http://mysite/wp-admin/nav-menus.php?action=edit&amp;menu=mymenu. ...

Grails/Groovy: URL params (max, offset) NumberFormatException thrown when blank/strings

in the controller params.max = Math.min(params?.max?.toInteger() ?: 10, 20) params.offset = params?.offset?.toInteger() ?: 0 if you enter in the following urls /books?offset=10&max= //error /books?offset=10&max=sdf //error /books?offset=&max=10 //works /books?offset=adsfa&max=10 //error java....

PHP cURL get content with accented URL

Using cURL with an accented URL, I cannot get content if CURLOPT_RETURNTRANSFER = true. Example: $curl = curl_init(); curl_setopt ($curl, CURLOPT_URL, "http://fr.wikipedia.org/wiki/Été"); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true); $html = curl_exec ($curl); echo $html; $html is empty, does someone have a solution ? ...

prevent url tampering in php

This is a test engine application with 5 papers set by me..as 5 php pages Flow of the application Login.html check.php // to check whether credentials r right if correct then main.php //user clicks on "take test" in this page which displays him 1 of the 5 papers... but once i am logged in i can just change the url to the url o...

Regex in preg_replace to detect url format and extract elements

I need to replace certain user-entered URLs with embedded flash objects...and I'm having trouble with a regex that I'm using to match the url...I think mainly because the URLs are SEO-friendly and therefore a bit more difficult to parse URL structure: http://www.site.com/item/item_title_that_can_include_1('_etc-32CHARACTERALPHANUMERICGU...

Is there a way to URL shortening in Java to store conveniently into databases

Hi I have requirement where as an attachment user can add a link from sharepoint So that we can save the link[path] of the attachment instead of actual attachment. For this we are planning to design a column which is varchar(512) . Intially we thought this would fit any type of URLs effectively ,but sometimes we found this is too tight ...

How to use pastebin from shell script?

Is it possible to use pastebin (may be via their "API" functionality [http://www.pastebin.com/api.php] ) inside bash shell scripts? In detail i mean: how do i send http-post? And how do i get back the url? Thanks ahead ...

Why does grails URL params decoding behave differently on server vs. local

Let's say I have the following entry in my grails URLMappings.groovy: "/actionName/param1"(controller:'myController', action:'myAction') When I call an URL where param1 includes + as a special character, the URL is encoded correctly to /actionName/my%2Bparam for example, both in my local and in my server environment. In my local envi...