get

Why GET method is faster than POST?

Hi All, I am just new to web programming and just curious to know abt Get and Post methods of sending data from one page to another page. It is said that Get method is faster than Post but i don't know why is it one reason i could find is that Get can take only 255 chars with it? Is there any other reasons , please someone explain me? ...

jQuery get text with wildcard contents after an element and move it

Hey, I think this might be a tricky one, but if anyone can solve it I'd be very impressed, and also very grateful. Here's the existing markup (which I can't change, otherwise then it'd be an easy problem and I could solve it myself!): <a title="1 topics" href="http://localhost/tags/amis/"&gt;amis&lt;/a&gt; (1) <a title="2 topics" hre...

How to switch from POST to GET in PHP CURL

I have tried switching from a previous Post request to a Get request. Which assumes its a Get but eventually does a post. I tried the following in PHP : curl_setopt($curl_handle, CURLOPT_POSTFIELDS, null); curl_setopt($curl_handle, CURLOPT_POST, FALSE); curl_setopt($curl_handle, CURLOPT_HTTPGET, TRUE); What am I missing? Additional ...

PHP fopen fails in response

I am having a problem doing a get on googles search url from php. Here's the code I have: <?php $handle = fopen("http://www.google.com/complete/search?hl=en&amp;js=true&amp;qu=" . $_GET["qu"], "r"); while (!feof($handle)) { $text = fgets($handle); echo $text; } fclose($handle); ?> Here's the error I get...

Importing comma separated data into Excel.

1,1,"Pound","The foe is physically pounded with a long tail or a foreleg, etc.",0,40,0,100,35,0,0,0,115,0 2,2,"Karate Chop","The foe is attacked with a sharp chop. It has a high critical-hit ratio.",43,50,1,100,25,0,0,0,115,0 3,3,"DoubleSlap","The foe is slapped repeatedly, back and forth, two to five times in a row.",29,15,0,85,10,0,0...

To match a figure in $_GET by PHP

How can you match the following figure in $_GET by PHP? I have the following URL <a href="?questions&777">To solve this problem in PHP</a> The number "777" changes for each question. I know that you can get the first parameter by if(array_key_exists('questions', $_GET) { -- // do this --}. However, I am not sure how you can refer to...

To manipulate URL based on coming URL by PHP

How can you manipulate the destination URL by the name of the starting url? My URL is www.example.com/index.php?ask_question I do the following manipulation in the destination URL if ($_GET['ask_question']) { // Problem HERE, since if -clause is always false if ( $login_cookie_original...

Beautiful way to remove GET-variables with PHP?

I have a string with a full URL including GET variables. Which is the best way to remove the GET variables? Is there a nice way to remove just one of them? This is a code that works but is not very beautiful (I think): $current_url = explode('?', $current_url); echo $current_url[0]; The code above just removes all the GET variables. ...

To keep login status in URL by PHP's GET

I put the variables email and password from POST to GET such that Part of my *handle_login_form.php* header("Location: /codes/index.php?ask_question&" . "email=" . $_POST['email'] . "&" . "passhash_md5=" . md5($_POST['password']) ); The user then clicks the About link. He should have the login info in the url, but he does not. He ha...

Parametrized get request in Ruby?

How do I make an HTTP GET request with parameters in Ruby? It's easy to do when you're POSTing: require 'net/http' require 'uri' HTTP.post_form URI.parse('http://www.example.com/search.cgi'), { "q" => "ruby", "max" => "50" } But I see now way of passing GET parameters as a hash using net/http. ...

Give the c++ code to given xml:

i created an xml like registry structure.. i can node traverse through node name ..here i cannot traverse a nodepath through attribute value ...i give the xml below.. <Computer> <HIVE Name="HKEY_CUREENT_USER"> <Elements> <element Name="(Default)" Type="REG_SZ" Data="(value not set)" /> <element Name="SoftwareMic...

Apache Redirect 301 fails when using GET parameters, such as ?blah=...

I've built a new PHP site for a customer and want to redirect the top ranking Google results from the old site structure to the new one. I've put several dozen Redirect 301's in a .htaccess in the documentroot, and while some work fine I'm having issues with a bunch of others. This works fine: Redirect 301 /nl/flash/banner_new.swf htt...

To find a reason of missing GET variables in PHP

How can you get the variables in URL to the next page in PHP? The user is at the URL http://localhost/codes/index.php?ask_question&amp;[email protected]&amp;passhash_md5=202cb962ac59075b964b07152d234b70 He sends a question and he goes to the following url where variables lost their values for some unknown reason. http://localhos...

Question about Javascript (Jquery) and GET

After getting a new page with $.get none of the javascript will run on the new page. Is there a way to make javascript use the new page too? Many thanks Dorjan Edit: Example: $(function() { $('.viewPage').click(function() { $('#mainarticle').fadeOut('slow') $.get($(this).attr('href'), { js: "1" }, function(data) { ...

What is the best way to design a HTTP request when somewhat complex parameters are needed?

I have some web services that I am writing and I am trying to be as RESTful as possible. I am hosting these web services using a HTTPHandler running inside of IIS/ASP.NET/SharePoint. Most of my services expect a HTTP GET. I have two of these that are simply returning some data (i.e., a query) and will be Idempotent, but the parameters...

Kohana, .htaccess, and $_GET

After uploading my Kohana project to my Godaddy server, I noticed my standard .htaccess file wasn't working sufficiently to provide the clean URLs. After some guidance, I ended up with the following rule: RewriteRule .* index.php?kohana_uri=$0 [PT,L] This got my nice-URLs working again, but today I find out that it may be breaking my ...

How do you just get the vars in a url using php?

I have a url, example.com/?/page1 and i want to find out what the GET part of the url is, for example: ?/page1 how do i do this? like, without having to split strings and stuff? ...

To get the current URL to the next page by PHP's sessions

How can you use the part after the question mark in the url which comes as a output of the following variable? $_SERVER['HTTP_REFERER']; I run unsuccessfully if (0 !== $_GET['question_id'] && isset( $_GET['question_id'] ) ) { $result = pg_execute( $dbconn, "query_fetch", array( $_GET[...

Page change notification via RSS for a POST page

Are there any web services that can return an RSS feed for a page that must be requested with a POST? Page2RSS.com or something like it generally works very well for this but they only work with GET requests. The website I am trying to turn into an RSS feed really should probably use GET instead of POST in the first place. Alternatively ...

what are the vulnerabilities in direct use of GET and POST?

Hi all, i want to know what are the vulnerabilities while using the GET and POST variable directly. ie with out trimming and addslashes function and mysql escape string something like that. My Question is What more we need to take care of while playing with GET and POST. What kind of attacks are there like SQL injection? ...