I'm building an application to retreive an image from internet. Even though it works fine, it is slow (on wrong given URL) when using try-catch statements in the application.
(1) Is this the best way to verify URL and handle wrong input - or should I use Regex (or some other method) instead?
(2) Why does the application try to find im...
Hi All,
I am building an application for my client and I am not using any frameworks . Question came up when building viewing user profile
My client wants to see the user profile URL like
mywebsite.com/Johnd - should give Johnd profile
mywebsite.com/KJohns - should give KJohns profile
I have implemented URL mapping like http:/...
Given protocol, username, password, hostname, port and path what is the easiest way to get a (properly encoded) URL
There are similar questions already asked but:
java.net.URI seems to not allow to pass the password
java.net.URLEncoder makes me split the path into components and encode each
...
I have a standard Login form
<asp:Login ID="lgnExcel" DestinationPageUrl="login/data.aspx" OnAuthenticate="Login1_Authenticate" runat="server">
Is it possible to attach the Username as a query string with the DestinationPageUrl or reference the value in the code behind. I've tried lgnExcel.UserName.ToString() but coudldn't get to sho...
Assuming I am given a URI, and I want to find the file extension of the file that is returned, what do I have to do in Java.
For example the file at http://www.daml.org/2001/08/baseball/baseball-ont is http://www.daml.org/2001/08/baseball/baseball-ont.owl
When I do
URI uri = new URI(address);
URL url = uri.toURL();
Strin...
I've got a site www.example.com on one server. I'd like to create www.example.com/blog on another server/host.
A) Can I do this?
B) How can I do this?
I've read a bit on using Apache's mod_proxy, proxypass, and ProxyPassReverse, but I'm not gifted enough with Apache or server mgt to know if I'm on the right track or not. Or, if there...
I'm managing the implementation of Single Sign-On functionality into a suite of websites and want to create the best possible solution for our users.
I would prefer that each user get a Profile Page that has the URL format:
http://website/<username>
But I also need to deliver content from that location, for example:
http://web...
Possible Duplicate:
retrieve the hash in the url with php?
iam having a page that is containg bookmark in its url like
http://www.abc.com/page_url#bookmark
iam using $_SERVER['HTTP_HOST'] and $_SERVER["REQUEST_URI"] to get the url but its gigvng URL only upto
http://www.abc.com/page_url i.e. its not giving my bookmarked lin...
I'm trying to use the jQuery.url plugin (http://projects.allmarkedup.com/jquery_url_parser/) to grab a specific parameter from the query string of a url of an anchor which has just been clicked on, like so:
HTML:
<a class="clickonme" href="http://www.example.com/my/url/params?myparam=ABC123">Link text</a>
JavaScript:
var myPa...
When users come to / they should be served a static index.html file.
When they come to /foobar the request should be sent to the backend server.
However, this is not the case, with the following:
pid logs/nginx.pid;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
de...
My login form on front page is displayed, but when it posts to other pages, the post does not happen. THe problem is that the url is like: http://sitename/users/action which is a 404 not found url. But when i hard code the path to controller, (that is, stop using base_url + "/users/action" and use base_url + "/system/application/controll...
Hi,
Imagine I have a string - something like this:
This is some really cool text about http://google.com/ and it also contains some urls like http://apple.com/ and its very nice! This is too long and I need to do some magic stuff to fix this very big problem. Oh no.
As you can see there are two URLs in the string and somehow, assumin...
Hello,
Is there a simple way to route my URLs without showing the ID in the URL. For example i have:
www.mywebsite.com/id-article-title.html and i want only www.mywebsite.com/article-title.html
Regards
...
i need to parse all urls from a paragraph(string)
eg.
"check out this site google.com and don't forget to see this too bing.com/maps"
it should return "google.com and bing.com/maps"
i'm currently using this and its not to perfection.
reMatch("(^|\s)[^\s@]+\.[^\s@\?\/]{2,5}((\?|\/)\S*)?",mystring)
thanks
...
Now here is my situation: I'm making a CMS. When links are clicked, i would like the pages to load dynamically using Ajax. The problem in the links!
The only way to change the address in the address bar real-time is to use anchor tags. But PHP doesn't get the anchor tags, thus I can't load page content on site load using PHP.
And if i w...
I'm looking for a list of heuristics, given an HTML document and/or a set of URLs on a web page, that will give a set of URLs that are previous/next links from that page. Also, assume that you are given the base URL. I do not require to know if a link is specifically a next or previous URL, just that it is one of those two.
I've got a...
Hi,
Do you know any JDK service in Java 1.5 that knows to take care of URL appending? (taking care of putting "?" or "&" depends on the fact that the query param is the first one or not).
Thanks,
Shay
...
Hi,
I want nutch to crawl abc.com, but I want to index only car.abc.com. car.abc.com links can in any levels in abc.com. So, basically, I want nutch to keep crawl abc.com normally, but index only pages that start as car.abc.com. e.g. car.abc.com/toyota...car.abc.com/honda...
I set the regex-urlfilter.txt to include only car.abc....
Hi All,
I have some problem with file_get_contents() function, it not working properly when I tried to read URL like
"http://google.com"
is accessible but when I tried to access any file like "classes/connect_temp.txt" it is not accessible.
Here is some code i use
$file_path =realpath('./')."/classes/connect_temp.txt";
$...
I'm using WAMP and the root folder of my page is: http://localhost/projects/bp/
In a Worpress application and I want to give unique id's to the body tag of every Page. So I did the following:
<?php
$page = $_SERVER['REQUEST_URI'];
$page = str_replace("/","",$page);
$page = str_replace(".php","",$page);
$page = str_repla...