get

Get URL and parameters with SSI

[亡魂溺海] 提交于 2019-11-30 13:23:39
I have to get URL and parameters with SSI (only with SSI), but I can't find any solution. For example: http://www.test.com/abc.html?data=something And I have to get value of parameter "data". <!-- set default value for SSI variable "data" --> <!--#set var="data" value="" --> <!-- get "data" value from URL --> <!--#if expr="$QUERY_STRING = /data=([a-zA-Z0-9]+)/" --> <!--#set var="data" value="$1" --> <!--#endif --> <!-- print the "data" value --> <!--#echo var="data" --> old question I know, but I just came across it while doing some SSI stuff myself. I'm sure you've fixed your problem by now,

Getting to the query string (GET request array) inside a web service in .NET

梦想的初衷 提交于 2019-11-30 13:07:15
I'm looking to find a way to access the .net query string contained in the standard ASP.NET request object inside a web service. In other words if I set a SOAP web service to this url: http://localhost/service.asmx?id=2 Can I access the ID Get variable? I just looked for "Request" of the context in asmx file and I saw that. But I'm not sure if it is right. this.Context.Request.QueryString["id"]; HttpContext.Current.Request.QueryString["id"] Since you ask, I guess there is no HttpContext.Current.Request ? While searching for the solution of the same problem i decided to take different approach.

How to Make an AJAX HTTPS GET Request Using jQuery

泪湿孤枕 提交于 2019-11-30 12:36:52
问题 How can I explicitly make an AJAX HTTPS GET request using jQuery? I am trying to do the following. On an https page, I have a line with the code $.get("/resource") , but I get the following error XMLHttpRequest cannot load http://www.site.com/resource. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.site.com' is therefore not allowed access. Why is the AJAX call trying to access the page using the HTTP protocol if the relative resource is from

Angularjs issue $http.get not working

拜拜、爱过 提交于 2019-11-30 12:02:43
问题 I am a novice to Angularjs and tried to follow example given for $http.get on angularjs website documentation. I have a REST service, which when invoked returns data as follows: http://abc.com:8080/Files/REST/v1/list?&filter=FILE { "files": [ { "filename": "a.json", "type": "json", "uploaded_ts": "20130321" }, { "filename": "b.xml", "type": "xml", "uploaded_ts": "20130321" } ], "num_files": 2} Part of the contents of my index.html file looks like as follows: <div class="span6" ng-controller=

Python Web Crawlers and “getting” html source code

99封情书 提交于 2019-11-30 12:00:28
问题 So my brother wanted me to write a web crawler in Python (self-taught) and I know C++, Java, and a bit of html. I'm using version 2.7 and reading the python library, but I have a few problems 1. httplib.HTTPConnection and request concept to me is new and I don't understand if it downloads an html script like cookie or an instance. If you do both of those, do you get the source for a website page? And what are some words that I would need to know to modify the page and return the modified page

Getting selected html content in tinymce editor

≯℡__Kan透↙ 提交于 2019-11-30 11:50:50
I have created a custom button using this code setup : function(ed) { ed.addButton('Tittle', { title : 'Tittle', image : './images/T.jpg', onclick : function() { ed.focus(); var c = ed.selection.getNode().nodeName; if(c!="TITTLE") { ed.selection.setContent('<tittle>' + ed.selection.getContent() + '</tittle>'); } else { } } }); When a user select a text and click on the new button, i want to add a <title> tag at beginning and ending, if <tittle> tag is not their.If <tittle> tag is already their in the selected text i want to remove the tag Thariama try selection.getContent({format : 'text'});

JQuery: Convert GET URL to POST

…衆ロ難τιáo~ 提交于 2019-11-30 11:43:39
what's the easiest way to convert a GET URL string to POST in jQuery? e.g. I want the params of a link <a href="/somepage?x=1&y=3" id="postlink">link</a> to be submitted as POST onclick if javascript is activated. No AJAX, just normal form submitting. Any Ideas? Thanks, Hannes. Sergey Toy I just write this code, check please, may be it helpful http://jsfiddle.net/AEwxt/ $('#postlink').click(function() { var p = $(this).attr('href').split('?'); var action = p[0]; var params = p[1].split('&'); var form = $(document.createElement('form')).attr('action', action).attr('method','post'); $('body')

How to obtain the query string in a GET with Java HttpServer/HttpExchange?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 11:09:41
I am trying to create a simple HttpServer in Java to handle GET requests, but when I try to get the GET parameters for a request I noticed the HttpExchange class does not have a method for that. Does anybody know an easy way to read the GET parameters (query string)? This is how my handler looks like: public class TestHandler{ @Override public void handle(HttpExchange exc) throws IOxception { String response = "This is the reponse"; exc.sendResponseHeaders(200, response.length()); // need GET params here OutputStream os = exc.getResponseBody(); os.write(response.getBytes()); os.close(); } } ..

htaccess mod rewrite $_GET to variables with slashes

孤街醉人 提交于 2019-11-30 09:53:30
I would like to rewrite URL's with htaccess to better readable URL's and use the $_GET variable in PHP I sometimes make use of a subdomain so it has to work with and without. Also are the variables not necessary in the url. I take a maximum of 3 variables in the URL the URL sub.mydomain.com/page/a/1/b/2/c/3 should lead to sub.mydomain.com/page.php?a=1&b=2&c=3 and the url sub.mydomain.com/a/1/b/2/c/3 should lead to sub.mydomain.com/index.php?a=1&b=2&c=3 where $_GET['a'] = 1 I came up with this after searching and trying a lot RewriteEngine on RewriteRule ([^/]+)\.domain.com/([^/]+)/([^/]+)/([^/

How can I do <form method=“get”> in ASP.Net for a search form?

混江龙づ霸主 提交于 2019-11-30 08:40:31
I have a search form in an app I'm currently developing, and I would like for it to be the equivalent of method="GET" . Thus, when clicking the search button, the user goes to search.aspx?q=the+query+he+entered The reason I want this is simply bookmarkable URLs, plus it feels cleaner to do it this way. I also don't want the viewstate hidden field value appended to the URL either. The best I could come up with for this is: Capture the server-side click event of the button and Response.Redirect . Attach a Javascript onclick handler to the button that fires a window.location.replace . Both feel