query-string

http_build_query putting strange chars in query string

♀尐吖头ヾ 提交于 2020-01-06 03:57:13
问题 I'm using cURL to submit a form and to do that I'm using PHP's http_build_query() to form a query string. I was wondering why the form didn't submit and then I echoed out the query string only to find a '¶' and a 'ð` in the query string. $post_data = array('terms' => 'true', 'ethnicity' => 0, 'param0' => 'Lance', 'param1' => 'Newman'); $post_data = http_build_query($post_data); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); echo $post_data; Returns

ClickOnce: How do I pass a querystring value to my app *through the installer*?

人盡茶涼 提交于 2020-01-06 03:29:25
问题 My company currently builds separate MSI's for all of our clients, even though the app is 100% the same across the board (with a single exception, an ID in the app.config). I would like to show them that we can publish in once place with ClickOnce, and simply add a query string parameter for each client's installer. Example: http://mysite.com/setup.exe?ID=1234-56-7890 The issue that I'm having is that the above ("ID=1234...") is not being passed along to the "myapplication.application". What

Defining Laravel routes when certain query strings are present

孤人 提交于 2020-01-05 05:45:06
问题 Say I want to be able to submit a search form on any page that will append a ?s= to the current url but return a SERP: https://example.com/my-page?s=foobar . (I've seen a few sites do this instead of pointing to /search?s=.* - not the way I'd do it, but it illustrates my question.) In my Laravel web.php routes, is there currently a way to register this other than maybe using a wonky regex? <?php Route::get('.+?\?.+?\bs={search}', 'SearchController@search'); // This regex is probably wrong,

Hyperlink image

微笑、不失礼 提交于 2020-01-05 04:20:07
问题 I have some thumbnails that I display with a Repeater, using a hyperlink and image control. I want to be able to click on a thumbnail, display the bigger image on the same page and I want the imagename to be part of the URL. Im really stuck right now. Do I use QueryString or..? My hyperlink now looks like this: <asp:HyperLink ID="HyperLink" runat="server" NavigateUrl='<%#Eval("name","Content/Images/{0}") %>' ImageUrl='<%#"Content/Thumbnails/" + Eval("Name") %>' >HyperLink</asp:HyperLink> Edit

jQuery get query string from it's own (self) link

元气小坏坏 提交于 2020-01-04 13:03:35
问题 Is it possible to have a javascript link like this (notice the query string): <script type = "text/javascript" src = "/js/myScipt.js?v=3"></script> and then in myScript.js get the value of v using jQuery? A javascript answer is okay too, but jQuery is preferred. Thanks in advance! I searched all over and all I could find were questions pertaining to getting the value of a query string in the URL, but not from it's own link. 回答1: //to set script do some thing like this var version = 3;

Regex for URL rewrite with optional query string parameters

百般思念 提交于 2020-01-04 10:43:31
问题 I have this rewrite rule: <rule name="rentals by proptype+state+city+street test" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{UNENCODED_URL}" pattern="^/([a-zA-Z0-9\-+]+)/rent/province/([a-zA-Z\-+]+)/street/([a-zA-Z0-9%\-+]+)/([0-9a-zA-Z%\-+']+)$" /> </conditions> <action type="Rewrite" url="search_new.aspx?proptype={C:1}&province={C:2}&city={C:3}&street={C:4}" appendQueryString="true" /> </rule> I also tried: <rule name="rentals by proptype+state+city+street test"

Regex for URL rewrite with optional query string parameters

断了今生、忘了曾经 提交于 2020-01-04 10:43:08
问题 I have this rewrite rule: <rule name="rentals by proptype+state+city+street test" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{UNENCODED_URL}" pattern="^/([a-zA-Z0-9\-+]+)/rent/province/([a-zA-Z\-+]+)/street/([a-zA-Z0-9%\-+]+)/([0-9a-zA-Z%\-+']+)$" /> </conditions> <action type="Rewrite" url="search_new.aspx?proptype={C:1}&province={C:2}&city={C:3}&street={C:4}" appendQueryString="true" /> </rule> I also tried: <rule name="rentals by proptype+state+city+street test"

why Request.QueryString replace + with empty char in some cases?

别等时光非礼了梦想. 提交于 2020-01-04 06:30:49
问题 I have a problem that if I pass a string that contain + in a query string and try to read it , it get the same string but by replacing + with empty char For example if i pass query like ../Page.aspx?data=sdf1+sdf then in page load I read data by data = Request.QueryString["data"] it will get as below data ="sdf1 sdf" I solve the problem by replacing any empty char with + .. But Is there any problem that cause that ? and Is my solution by replacing empty char with + is the best solution in all

why Request.QueryString replace + with empty char in some cases?

蹲街弑〆低调 提交于 2020-01-04 06:30:03
问题 I have a problem that if I pass a string that contain + in a query string and try to read it , it get the same string but by replacing + with empty char For example if i pass query like ../Page.aspx?data=sdf1+sdf then in page load I read data by data = Request.QueryString["data"] it will get as below data ="sdf1 sdf" I solve the problem by replacing any empty char with + .. But Is there any problem that cause that ? and Is my solution by replacing empty char with + is the best solution in all

HttpWebRequest with POST and GET at the same time

谁都会走 提交于 2020-01-04 05:23:41
问题 I need to redirect a user to http://www.someurl.com?id=2 using a POST method. Is it possible? If yes, then how? Right now I have following and it forwards the POST data properly, but it removes the ?id=2: HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.someurl.com?id=2"); request.Method = WebRequestMethods.Http.Post; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = postData.Length; using (StreamWriter writer = new StreamWriter(request