Wednesday, May 25, 2011

PHP Proxy for QlikView sever

It is quite counter-intuitive that the server-settings for QVS have to be configured in Internet Explorer's settings page, using the same account that is used to run QVS service. Not to mention that whenever the account decides to configure itself as "roaming profile", or the domain policy for Internet explorer is changed, or .. the settings are lost = maps don't work.

Here is another way , where there is a local Apache web server running PHP and acting getting the Google maps thry the same proxy that is configured in Internet Explorer. It uses Windows authentication for the proxy server.

Probaly you can write the equivalent in other webserver (ex IIS ) and other programming language .

$usr = 'user:password';

$proxy = '10.11.12.13:8080';

//force header to JPEG

header("Content-type: image/jpeg\n\n");

//same GET parameters as with Google Maps

$url = 'http://maps.google.com/staticmap?center=' . $_GET['center'] .

'&zoom=' . $_GET['zoom'] .

'&maptype=' . $_GET['maptype'] .

'&size=' . $_GET['size'] .

'&key=' . $_GET['key'];

// create a new cURL resource

$ch = curl_init();

// set URL and other appropriate options

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_HEADER, 0);

//curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);

curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);

curl_setopt($ch, CURLOPT_PROXY, $proxy);

curl_setopt($ch, CURLOPT_PROXYUSERPWD, $usr);

// grab URL and pass it to the browser

curl_exec($ch);

// close cURL resource, and free up system resources

curl_close($ch);

?>

Monday, May 9, 2011

video about Reverse Snowflake Joins

Hi,

Here is a nice video about RevJ : http://www.youtube.com/watch?v=UPZctPW9Nmc

-Alex