Hi,
I am trying to get the search keyword from a referrer url. Currently, I am using the following code for Google urls. But sometimes it is not working...
$query_get = "(q|p)";
$referrer = "http://www.google.com/search?hl=en&q=learn+php+2&client=firefox";
preg_match('/[?&]'.$query_get.'=(.*?)[&]/',$referrer,$search_keyword);
...
I'm trying to create a regular expression to extract URLs from text documents using Java, but thus far I've been unsuccessful. The two cases I'm looking to capture are listed below:
URLs that start with http://
URLs that start with www. (Missing the protocol from the front)
along with the query string parameters.
Thanks! I wish I rea...
Hey,
When I log onto some sites, ex. http://mysite.com and then go to http://www.mysite.com, I'm not logged in? But if I switch back to http://mysite.com (without the www's) I'm logged in again?
Anyone know why this is or how to make it so that if you log in on one, you're logged in on both?
Thanks,
Matt
...
When you edit a question on stackoverflow.com, you will be redirected to a URL like this:
http://stackoverflow.com/posts/1807421/edit
But usually, it should be
http://stackoverflow.com/posts/1807491/edit.php
or
http://stackoverflow.com/posts/edit.php?id=1807491
How was
http://stackoverflow.com/posts/1807421/edit
...
Basically, i have a list of 30,000 URLs.
The script goes through the URLs and downloads them (with a 3 second delay in between).
And then it stores the HTML in a database.
And it loops and loops...
Why does it randomly get "Killed."? I didn't touch anything.
Edit: this happens on 3 of my linux machines.
The machines are on a Rackspac...
What’s the difference between an URL Encode and a HTML Encode?
...
Is there a definitive (or otherwise) list of schemes that iPhone Apps support via:
- (BOOL)openURL:(NSURL *)url
...
Suppose I have:
my $a = "http://site.com";
my $part = "index.html";
my $full = join($a,$part);
print $full;
>> http://site.com/index.html
What do I have to use as join, in order to get my snippet to work?
EDIT: I'm looking for something more general. What if a ends with a slash, and part starts with one? I'm sure in some module, some...
I'd like to use routing from my app, so that TomTom or Navigon get opened with right "from" and "to" addresses. Does anybody know if TomTom or Navigon apps register a URL Handler on the iPhone?
...
Because of issues with the Content-Disposition header (character encoding, cross-browser support) I decided to give another way to dynamically serve files a try.
Namely, I redirect the request to something like:
localhost/Download/Page.aspx/filename-without-extension
in order for the browser to pick up the file name at the end.
I als...
I want to redirect a request to some URL that may or may not contain non-ascii characters (e.g. german umlauts).
Doing this with the relevant part of the URL:
var url = HttpUtility.UrlEncodeUnicode("öäü.pdf"); // -> "%u00f6%u00e4%u00fc.pdf"
and then issuing the redirect:
Response.Redirect(url, ...);
will not produce the desired be...
<div><a href="http://anirudhagupta.blogspot.com/">Anirudha Web blog</a></div>
What is the Regular Expression to get http://anirudhagupta.blogspot.com/
from
<div><a href="http://anirudhagupta.blogspot.com/">Anirudha Web blog</a></div>
If you suggest in c# that's good
i also like jQuery for do this.
HTML code is also means for...
H!,
I have a solution in which there is several other sub projects (windows application).
in every project I have some web services added.
Now the problem :
how can i set the URL of each web service individually from the app.Config file??
is there a setting I missed to set ?
can it be automatically done or I have to code for it ?
Than...
I am in the process of deploying a new Django site to replace a current Wordpress blog. As I get it setup, I want to test everything in the domain's subdirectory before I switch things to the root and "go live". For example: http://example.com/django/
Editing my .htaccess file allows me to redirect things without a hitch (I can see th...
I have been trying to find an effective url parser, php's own does not include subdomain or extension. On php.net a number of users had contributed and made this:
function parseUrl($url) {
$r = "^(?:(?P<scheme>\w+)://)?";
$r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?";
$r .= "(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" . "(?P<doma...
how i can get feed url (RSS Or ATOM) from blog url
ex:- http://anirudhagupta.blogspot.com/
So how i can get his feed dynamically by c#
i say that how i can get blog's feedurl by using Regex and c#
...
we know that all blog show his blog 's rss feed by
<link rel="alternate" type="application/rss+xml" title="MyBlog RSS Feed" href="http://feeds.feedburner.com/MyBlog" />
but are you know any regex to get feedurl from this
<link rel="alternate" type="application/rss+xml" title="MyBlog RSS Feed" href="http://feeds.feedburner.com/MyBlog...
Given a region defined by a rectangle and a url, is there any way to determine what elements lie within the given rectangle on the page at the given url?
EDIT: Screen resolution, Font size, etc.. can all be set to reasonable defaults.
...
Heya guys.
I'd like to get the value after a hash in the URL of the current page and then be able to apply this in a new function... eg.
The URL could be
www.example.com/index.html#foo
And I would like to use this in conjunction with the following piece of code
$('ul#foo:first').show();
I'm kinda assuming/hoping there is some...
I'm trying to rewrite the following URL, but I always get a 404 error. I know that the Url Rewrite is working because I have other rewrites working. Any idea what I am doing wrong?
<rule name="PixelTracking">
<match url="^pixel([0-9]*).png?OrderTotal=([0-9]*)&OrderID=([0-9]*)" />
<action type="Rewrite" url="^Confir...