url

URL regex with regex.h in c

SO: I'm having a bit of difficulty setting up a regex to match a URL using the regex.h library in c. I have a working IP regex that I was hoping to convert to match a simple string such as www.alphanumerictext12.com|edu|org. Something is wrong with my syntax in the regex definition itself. Below is the working IPREGEX code and my a...

Making CSS url() relative to document

When it comes to CSS the following rule applies: Partial URLs are interpreted relative to the source of the style sheet, not relative to the document. But here's my problem : I have different websites that use the same CSS file. While they use the same layout, the actual images the CSS references are different for each one of them. ...

Allow / in django url

I want to make a wiki, and i must assign for each url a view. Each url can contain letters (A-Z, a-z), digits and punctuation ('.', ',', '/', '-', '_'). How can i make the expression ? I want something like this : (r'^(?P<wiki_page>\w+)/$', 'www.wiki.views.page') but this works only for letters, digits and '_'. ...

Google AJAX API inurl: (Non-Javascript Enviornment)

Hey everyone, thanks for taking the time to look. I'm trying to get results from the following request: http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=inurl%3AnphMotionJpeg I'm getting a valid 200 server response but no results, even though searching for inurl:nphMotionJpeg in Google returns about two pages. The resp...

Using PHP to find part of a URL

Take this domain: http://www.?.co.uk/elderly-care-advocacy/mental-capacity-act-advance-medical-directive.html How could i use PHP to find the everything between the first and second slash regardless of whether it changes or no? Ie. elderly-care-advocacy Any helo would be greatly appreciated. ...

Reading 200 urls automatically with varying intervals between requests

By calling the example URL below my Java servlet caches one file at a time (with corresponding "filekey"). http://www.example.org/JavaServlet?fileKey=phAwcNAxsdfajsdoj&amp;action=cache Now I have 200 files I'd like to cache ... Instead of calling all these URLs manually I'd like to use fopen, curl or something else to automatically go ...

Why do so many Javascript scripts append random numbers to things? Collision?

I've been learning JavaScript recently, and I've seen a number of examples (Facebook.com, the Readability bookmarklet) that use Math.rand() for appending to links. What problem does this solve? An example parameter from the Readability bookmarklet: _readability_script.src='http://lab.arc90.com/....script.js?x='+(Math.random()); Are t...

Making a URL W3C valid AND work in Ajax Request

I have a generic function that returns URLs. (It's a plugin function that returns URLs to resources [images, stylesheets] within a plugin). I use GET parameters in those URLs. If I want to use these URLs within a HTML page, to pass W3C validation, I need to mask ampersands as &amp; /plugin.php?plugin=xyz&amp;resource=stylesheet&amp...

Getting URL for item using GetSiteData in Sharepoint

I'm using web.Site.MakeFullUrl((new SPFieldLookupValue(row["FileRef"] as string).LookupValue)) to get the URL to results in a GetSiteData query. For some items this works fine, but for others I get results like http://server/Lists/My%20Message%20Board/Test/9_.000 - which always 404s. The urls always end in n_.0000. Does anybody know wh...

How to convert URL string with multiple delimiters into another string in PHP?

So I have this sample string: ?items=3744130|1^356221|2^356222|1 extracted from a URL: http://www.example.com/process.php?items=3744130|1^356221|2^356222|1 I need to convert it into this, and for the life of me I'm getting stuck. ?items=model_1=3744130&qty_1=1&model_2=356221&qty_2=2&model_3=356222&qty_3=1 I've gotten this far bu...

Getting List Item URL in Sharepoint 2007

I'm creating a webpart that aggregates a load of content from different lists throughout our site collection what I can't workout is how to get the exact link to each item. All I seem to get back is {site}/{listtitle}/1.000 how do I get this "1.000" to say "pagename.aspx?id=1", is this something I have to work out myself or is there a fu...

passing form variables into a url with php

Hi, I have the following form which allows a user to select dates/rooms for a hotel reservation. <form action="booking-form.php" method="post"> <fieldset> <div class="select-date"> <label>Arrival Date</label> <select name="arrd" class="day"> <option value="1" >1</option> ... snip ... <option va...

php apache url rewrite

I have an url with the following format: domain/product.php?name=product a Now I need to rewrite this to: domain/product a(including the space in the word) like: http://www.directline-holidays.co.uk/Costa Blanca How do I do this? The closest result I got so far is the following: domain/p/product-a With the following code in .htaccess ...

Generally a Good Idea to Always Hash Unique Identifiers in URL?

Most sites which use an auto-increment primary-key display it openly in the url. i.e. example.org/?id=5 This makes it very easy for anyone to spider a site and collect all the information by simply incrementing the value of id. I can understand where in some cases this is a bad thing if permissions/authentication are not setup co...

IIS7 rewrite for REST not working

I have a REST service and am trying to remove the .svc - a common task/problem. The application on the server is in a virtual directory under the default website (not sure if this is important) I have installed the IIS Rewrite Module and have tried to create a rewrite rule for this. http://blah.me.com/here/thingys/get?id=1111 to rew...

Test data for Anti Phising Tool testing

Hi All, I am in urgent need for latest live phishing and fraud site url for testing Anti Phishing tool. Can I get list or source from where I can get few Phished/Fraud URL list for testing .... THanks Nav ...

URL Decoding in PHP

I am trying to decode this URL string using PHP's urldecode function: urldecode("Ant%C3%B4nio+Carlos+Jobim"); This is supposed to output... 'Antônio Carlos Jobim' ...but instead is ouptutting this 'Antônio Carlos Jobim' I've tested the string in a JS-based online decoder with great success, but can't seem to do this operation s...

Textmessage containing an appstore link

Hi, how do I build a link, which opens the appstore and shows an app (something like itms://myapplication?action=show). I want to send that link via a text message (over the web). All I've found was the ITMS link generator. Best regards, Stefan ...

IIRF redirect combine rules?

I have 3 "rules". One to make sure URLs are lowercase another to include a slash at the end of directories, and a 3rd to force access to index.html pages to be thru the directory instead. The problem w/ how I have it is, sometimes this is causing multiple 301 redirects. I'd really like each rule to apply in turn and then if neccessary r...

php getting part of a url into a sting

This question is more of a "what is the best/easiest way to do this type of question. I would like to grab just the users id from a string such as <a href="/profile.php?rdc332738&amp;id=123456&amp;refid=22">User name</a> I would like to parse the string and get just the "123456" part of it. I was thinking I could explode the string but...