url

Getting HTTP 503 error while accessing a URL from my Java program

I'm building a Java application which will download a HTML page from a website and save the file in my local system. I'm able to manually access the web page's URL via browser. But when I try to access the same URL in my Java program, the server returns a 503 Error. Here's the scenario: sample URL = http://content.somesite.com/demo/s...

Need a regex to validating a Url and support %20 and ()

Hi, I'm currently using the following regular expression to validation URLs: ^(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?#Username:Password)(?:\w+:\w+@)? (?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|edu|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:...

ShareThis setting properties in callback don't work

I'm using the ShareThis widget. I need to change the url property after the object has been created so I'm using the callback function option. In the callback function, I attempt to change the url property but the email that goes out still contains the old value. Has anyone been able to solve this problem? If so, I would appreciate y...

PHP Strip string of first url and report results

Russel Peter video: <a rel="nofollow" href="http://www.youtube.com/watch?v=2bP9tRhJRTw"&gt;www.youtube.com/watch?v=2bP9tRhJRTw&lt;/a&gt; russel peters video blah blah. Turtles: <a href="http://turtles.com"&gt;turtles.com&lt;/a&gt; I have a string that contains text and and tags with enclosed urls like the above example. I want to str...

ASP.net MVC support for URL's with hyphens

Is there an easy way to get the MvcRouteHandler to convert all hyphens in the action and controller sections of an incoming URL to underscores as hyphens are not supported in method or class names. This would be so that I could support such structures as sample.com/test-page/edit-details mapping to Action edit_details and Controller tes...

REST best-practice for overlong URIs

I have REST services which should receive really long queries via GET. Say for example I want to query a service with many geographical coordinates to find out something about all this coordinates. 1) My first thought was to use long URIs and increase the max URI length of the servlet container. It would look like this: GET http://so...

getting a link with str_replace

hi! as a warning I have very limited experience with PHP, with just over 1 month of learning it. I have a textform that when its submitted it goes through str_replaces on the allowed tags (eg [img]) to turn them into html tags. What I want to do Is grab the URLS from the $string and add links to the original image and the url to the re...

writing a http sniffer

Hi all, I would like to write a program to extract the URLs of websites visited by a system (an IP address) through packet capture.. I think this URL will come in the data section ( ie not in any of the headers - ethernet / ip / tcp-udp ).. ( Such programs are sometimes referred to as http sniffers , i'm not supposed to use any availab...

trying to send array through GET variable, when printed, var equals string of 'Array'

Whenever i build a URL i.e. cart.php?action=add&p[]=29&qty[]=3&p[]=5&qty[]=13 and try to grab the p variable and the qty variable, they = 'Array' var_dump = array(3) { ["action"]=> string(3) "add" ["p"]=> string(5) "Array" ["qty"]=> string(5) "Array" } i create half the url with php, and the other half is concatenated with ja...

How to get more categories listing from Magento in all page - Product Url problem & related product url problem

I want listing a (inactive) category product in the right column in all page of my magento site. To make this i used a snippet of code that i found in stackoverflow site. Below there is the snippet of code I have adapted to my esigence(sorry for ugly code but I'm not developer): <?php $h3h3=Mage::getModel('catalog/category')->load(15);...

mod rewrite problem

Hi, I am trying to redirect my pages using URL: RewriteRule ^(.*)/content/(.*)/?(.*)\.html$ browse.php?s=$1&c=$2&l=$3 [NC,L] For 2 parameters it works fine but when I passes 3 parameters it merges the 2 and third. Correct output is as follow (2) parameters: Array ( [s] => wallpapers [c] => Global_Celebrities [l] => Nicole1); ...

Wicket page links do not use mounted URL coding strategy?

In the Wicket Application class I have mounted a page at the location /about mountBookmarkablePage("about", AboutPage.class); I verify that the about page is available at /about. Then in the page which needs a link to the about page, I use the Wicket Link class: add(new Link("link") { @Override public void on...

Is it possible to dynamically change the URL of a webpage?

Hi! I just wanted to know, is there any possible way to change the URL that appears in the address bar of a webpage dynamically? Like, maybe there are two buttons on the webpage, and when the user clicks one it will (or won't it does not matter) refresh the page and the url will be mysite.com/page1, or if the user clickes the second butt...

Is there someway to change the content of a page with the htaccess file?

Hi! I just wanted to know if there is someway to use the htaccess file to chnage the content of a page(s). Maybe something sort of like the redirect, but instead of sending the user to another page, it would just change the content of the whole page. Thank you for any and all help! ...

How to get the sub-string lying in between two sub-strings in C ?

I have a packet capture code that writes http payload into a file. Now i want to extract the URL information from these dumps. For each packet , the payload begins like this. GET /intl/en_com/images/logo_plain.png HTTP/1.1..Host: www.google.co.in..User-Agent: Mozilla/5.0 I would like to extract : the string between "GET" an...

What do you call the entire first part of a URL?

If I have a URL like: http://www.example.com:9090/test.html Then I know that www.example.com is the host name, but what do you call http://www.example.com:9090? Is there some kind of established name for that? ...

How to retrieve the URL of a page using PHP?

Newbie question here, is there any inbuilt PHP tag that can be used to retrieve the URL of a page and echo it on the screen? Thanks. ...

How does magento parse url?

Hello, We used django and in django there is one file urls.py which mention all possible url patterns. So we just want to know that when i open url http://localhost/magento/index.php/test123.html how this will map to product and which file i can check for this. ...

using primary key in asp.net mvc urls

i keep hearing that i shouldn't be using primary keys in my asp.net mvc url for example: /Users/Edit/1243 what is the issue here? what is the alternative, putting in user names? as you want it to be unique, it seems like primary key is the cleanest option thoughts? ...

Direcway/Directpc odd URLs - "/books/api_XXXXX.js"

Hi Stackoverflowians, Any clues on what the following URL is? Its only coming from Direcway/Directpc users, and no its NOT a valid URL on my website. XXXX - - [18/Jan/2010:00:49:47 -0500] "GET /books/api_2c4493bef32ff487496dab60136a4374.js?hl=en HTTP/1.1" 404 1101 The books url is requested just after each and every legitimate request...