Search Results

Search found 12 results on 1 pages for 'faya'.

Page 1/1 | 1 

  • Codeigniter or PHP Amazon API help

    - by faya
    Hello, I have a problem searching through amazon web servise using PHP in my CodeIgniter. I get InvalidParameter timestamp is not in ISO-8601 format response from the server. But I don't think that timestamp is the problem,because I have tryed to compare with given date format from http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html and it seems its fine. Could anyone help? Here is my code: $private_key = 'XXXXXXXXXXXXXXXX'; // Took out real secret key $method = "GET"; $host = "ecs.amazonaws.com"; $uri = "/onca/xml"; $timeStamp = gmdate("Y-m-d\TH:i:s.000\Z"); $timeStamp = str_replace(":", "%3A", $timeStamp); $params["AWSAccesskeyId"] = "XXXXXXXXXXXX"; // Took out real access key $params["ItemPage"] = $item_page; $params["Keywords"] = $keywords; $params["ResponseGroup"] = "Medium2%2525COffers"; $params["SearchIndex"] = "Books"; $params["Operation"] = "ItemSearch"; $params["Service"] = "AWSECommerceService"; $params["Timestamp"] = $timeStamp; $params["Version"] = "2009-03-31"; ksort($params); $canonicalized_query = array(); foreach ($params as $param=>$value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param. "=". $value; } $canonicalized_query = implode("&", $canonicalized_query); $string_to_sign = $method."\n\r".$host."\n\r".$uri."\n\r".$canonicalized_query; $signature = base64_encode(hash_hmac("sha256",$string_to_sign, $private_key, True)); $signature = str_replace("%7E", "~", rawurlencode($signature)); $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature; $response = @file_get_contents($request); if ($response === False) { return "response fail"; } else { $parsed_xml = simplexml_load_string($response); if ($parsed_xml === False) { return "parse fail"; } else { return $parsed_xml; } } P.S. - Personally I think that something is wrong in the generation of the from the $string_to_sign when hashing it.

    Read the article

  • Programmers joy: the proccess or the result?

    - by faya
    Hello, Recently I stumbled upon this curious question: What is importing for yourself when programming: process or result? I found myself that I love outcome, when everything is done! So I tried to ask some colleagues at work, but all of them responded that they like the development process the most. Myself I like process too, but not as much as outcome. So to which people category you belong too? And if there is a reason, could you express why?

    Read the article

  • QT drawing without erasing widget

    - by faya
    Hello, If I have a derived object of QWidget class and on slot function in it I have an update(). here is some pseudocode: *.h slot: updateNow(); *.cpp constructor() { setPalllete(QPallete(QColor(250,250,200))); setAUtoFillBackground(true); } updateNow() { update(); } paintEvent() { QPainter painter(this); painter.drawRect(1,2,3,4); } So how should I don't get erased my pallete after update() call? P.S. - Sorry for my English and only pseudocode.

    Read the article

  • Javascript obfuscation and extreme situation in production solving

    - by faya
    Hello, I have a few questions regarding JavaScript obfuscation on client side. First question: What is the best tool or best three tools which ones you could suggest for this operation? Second question: How developers should debug such code (in example with firebug) when extreme situation appears in the production if the code is obfuscated? P.S. - I know that it's bad practice to debug in production, but we had some emergencies and experienced sometimes such situations. Thanks for any help!

    Read the article

  • MySQL limit from descending order

    - by faya
    Hello, Is it available to write a query to use same "LIMIT (from), (count)", but get result in backwards? In example if I have 8 rows in the table and I want to get 5 rows in two steps I would: first step query: select * from table limit 0, 5 first step result: first 5 rows; second step query: select * from table limit 5, 5 second step result: last 3 rows; But I want to get it vice versa. I mean from the first step I want last 3 rows and from the second I want 5 first rows. Thank you for your answer

    Read the article

  • Ruby on Rails, PHP or C++ for web social network

    - by faya
    Hello, I have chosen diploma work in university. It's a mini social network. But now I am really stuck with which technology I should stick. I am average at C++ ISAPI web services development, below average PHP(had few projects with it) and new to Ruby and its framework RAILS. I have a deadline 1.5 month to develop it(about 5 hours every day after my full time job). Also I heard that its very easy to learn and develop with Ruby on Rails. Considering C++ I know that I have to do lots of coding and work by myself and PHP looks almost the same to me. So I am looking for you skilled developers advise what would you do in my position? Learn RoR, stick with C++ or PHP or maybe use something else?

    Read the article

  • Posting within PHP and receiving only cookie

    - by faya
    Hello I have a question. It might be sound ridiculous, but let me explain what I want to accomplish. Right now I try to embed open source forum to by site and I want to leave forum and my site databases split. When my site users are logging in I want them also automatically be logged in to the forum system. For that I want to login within my PHP code after receiving username and password in post, but I don't know how I can get only cookies in response. I have found out that I can use curl_init(), curl_exec(), curl_close() functionality, but response from curl_exec returns whole response(page content, cookies, headers). Is there a way to receive only cookies? P.S. - If my design is totally wrong please give an advise how I can embed this functionality! I would be very thankful!

    Read the article

  • Codeigniter + ajax(jQuery) session problem

    - by faya
    Hello, I have a problem in server side retrieving session with using ajax post request. Here is my sample code: JavaScript: $(function() { $('.jid_hidden_data').submit(function() { var serialized = $(this).serialize(); var sUrl = "http://localhost/stuff"; $.ajax({ url: sUrl, type: "POST", data: serialized, success: function(data) { alert(data); } }) return false; }); }); CodeIngiter(PHP) side: function stuff() { $post_stuff = $this->input->post('my_stuff'); // WORKS PERFECTLY $user_id = $this->session->userdata('user_id'); // RETURNS NULL } Where commented returns NULL it should return users session data, because it really exists. What is the problem? Method post doesn't get cookies or what? Thanks for any help!

    Read the article

  • Ajax(jQuery) strange file post problem

    - by faya
    Hello, I have a problem posting file via ajax jQuery function. I have something like this: $('#my_form').submit(function() { var serialized = $(this).formSerialize(); var sUrl = "xxx"; $.ajax({ url: sUrl, type: "POST", data: serialized, success: function(data) { $(".main_container").html(data); } }) return false; // THIS return statment blocks sending file content }); When I remove return false statement everything is okey, server side gets the file content and etc, but when it's there (i monitor with firebug) that this posting sends only file name. What can be wrong? P.S. - I need this return false statement, because I want to manipulate return data myself.

    Read the article

  • Embedding other system and overriding it links

    - by faya
    Hello, I have a question. Is there is a way to override hrefs, posts and etc? In example I embed 3rd part forum inside of my container and I click anything there page response will be loaded into the same container and not reloading everything in the window.

    Read the article

  • jQuery how to set click on href in the div?

    - by faya
    Good day, I want to set click event on every anchor element in my div container. Here is an example what I want to do: ---HTML--- <div id="my-container"> <a href="page1.html">page1</a> <a href="page2.html">page2</a> <a href="page3.html">page3</a> </div> ---- jQuery ---- $("#my-container a").click(function() { var link = $(this).attr("href"); $("#my-container").load(link); }); What I want to do is to let me handle loading event of href clicks and load it to the same container. And this is must done without id, class attributes which aren't available for that hrefs. The problem is in this: $("#my-container a"). Any help would be appreciated! Thanks UPDATE People doesn't seem to get right what I wanted to ask. I repeat myself again. $("#my-container a") <---- doesn't add click events on href anchors. So how I can set click event?

    Read the article

1