get

Apache mod_rewrite - How to hide $_GET vars from url

When I call the page http://localhost/books-123-name.html?language_id=1 to appear in the browser the following link: http://localhost/books-123-name.html but will keep the value language_id=1 How can this be done? Thanks. ...

PHP - Zend say avoid Magic Methods?

I was reading this page - http://www.hm2k.com/posts/50-php-optimisation-tips-revisited And one of the recommendations was to avoid using Magic Methods, cited from a Zend Performance PDF which gives no reason for its recommendation to avoid them. After some Google searching (and winding up here to an unrelated question) I wondered if an...

Retaining values across POST in a VERY basic php form

I'm going through a very basic php tutorial and am creating a calculator so I can get the hang of $_GET, $_POST and some general syntax. I created a very basic php function calc(); in a php file called functionadvanced.php. All it does is take 2 numbers, an operator, does the math and spits out the results (like I said, very basic tuto...

How to loop on $_GET array and escape all its variables?

Hi, How to mysql real escape string all $_GET contents? Thanks ...

Request Accept media type in RESTlet 2

How can I identify the resource media type in RESTlet2, I tried following in my class extended from ServerResource @Get public Object onGET(){ System.out.println("================="); System.out.println(this.getRequestEntity().getMediaType()); ... It prints a null when I do any request. I want to get the list of all Accept medi...

Passing values form one form into another - a weird case.

Hello all, Please have a look to the following code: <?php $nomeDominio=''; if (isset($_GET['infoDominio'])) { $nomeDominio = $_GET['nomeDominio']; echo "I'm getting ".$nomeDominio; } if (isset($_POST['atualizarDominio'])) { echo "I'm posting ".$nomeDominio; } ?> <!DOCTYPE HTML PUBLIC "-//W...

Alternative syntax to GET in url

I've inherited terrible code in the past, but one idea in there struck me as a logical step. It's to use non-standard get queries for links inside the application. So instead of /search?category=23&city=Venice when applicable, use /search/category-23;city-Venice These kind of uris get parsed for comfortable use by the system and ...

AS3 - How do you receive parameters in a swf from a GET request?

I tried using var params: Object = ((this.stage.loaderInfo) as LoaderInfo).parameters; to get the parameters, but it returns an Object with no properties. That LoaderInfo will give me the correct URL without the parameters though if I use LoaderInfo.url. I'm using the request: http://localhost/foo.swf?start=foobar. params.hasOwnProperty...

How to obscure a GET variable?

I'm toying with the idea of creating automatic electronic certificates. It's pretty easy to create custom certificates using the fpdf PHP class. The way I have it set up is that given a URL http://www.example.com/makepdf.php?name=myname&amp;class=classname you get a PDF certificate with the student name and the class they took taken fro...

phpBB Welcome, "Username"!

I have a site with a phpBB forum and I have a separate login through a different page. I want it so when a user logs in, it will display a "Welcome, 'Username'!" message and when they are not logged in it says, "Welcome, Guest!". I just can't find the syntax to get the username. I don't really have any code so far that has gotten anywhe...

How do i make $_GET more secure.?

Hi, I am using the get method to perform some operation like, approve, markasspam, delete, for commenting system. i know it is highly insecure to go this way but i cannot help it out. because the reason for using $_GET method is to perform the operation within the page itself using PHP_SELF, and FYI i am using the post method using chec...

PHP using Gettext inside <<<EOF string

I use PHP's EOF string to format HTML content without the hassle of having to escape quotes etc. How can I use the function inside this string? <?php $str = <<<EOF <p>Hello</p> <p><?= _("World"); ?></p> EOF; echo $str; ?> ...

XSRF protection GET .net mvc

I have a site which will show sensitive information. I am using Anti Forgery Tokens etc to protect against XSRF in POSTS. However I am worried about someone being able to view sensitive info from a GET. What is the recommended practice for protecting read only data sent via a GET in .Net MVC 2? ...

Is there something wrong with this jQuery?

function insertParamIntoField(url, param, field) { var anchor = document.createElement('a'), query; anchor.value = url; query = anchor.query.split('&'); for(var i = 0, kv; i < query.length; i++) { kv = query[i].split('=', 2); if (kv[0] == param) { field.value = kv[1]; return; } } } ...

$get multiple variables from url

I am making a photography website. In the DB there is an images table, events table and category table which as linked via foreign keys. At the moment i generate events from when a photo was taken from the database and turn them into anchor links. <?php while ( $a_row = mysql_fetch_row( $result ) ){ foreach ( $a_row as $field ){ ?> ...

Restlet JSONException

i want to use Restlet and i am new to it. I put restlet app in servlet container but when i want to create a JSON response from GET request it returns JSONException. Interestingly (at least for me:) when i used same resource from restlet component got no errors. what should i do to be able to use Restlet in servlet container? Thanks ...

Sending lots of data through POST or GET

I am trying to send an XML file from a textfield in my html, via ajax to a PHP file. This is the almighty PHP file: <?php $data = urldecode($_POST["xml"]); echo $data; ?> Data is sent to this file as such: $("#btn_save").click(function() { var data = escape($("#textfield").text()); alert(data); $.ajax({ ...

How to get the value from the anchor href?

I have an anchor like <a href="/category/post/?type=234#content">link</a>. Using a jQuery is it possible to get the value of "type" in URL and assign as a value for a hidden input type in same page without refreshing the page. ...

jQuery.Get() help

Hey, I'm trying to use the jQuery.Get() function to return the contents of a webpage. Something along the lines of - var data = $.get("http://mysite...../x.php"); I know the above is wrong, can someone help my out here? Cheers, ...

Clean form input to lowercase alphabetical using php

I have a simple php file with a GET from a form to throw up some files from a directory. Quite simple code but I just need to strip from the string ANY characters that are NOT lowercase alpha. How would I go about doing that? (I'm a novice). Here 'tis: <?php $text = $_GET['text_string']; ?> <form method="GET" action="index.php">Please...