{"id":129,"date":"2013-01-31T15:10:05","date_gmt":"2013-01-31T13:10:05","guid":{"rendered":"http:\/\/www.ygo.ro\/?p=129"},"modified":"2013-01-31T15:11:11","modified_gmt":"2013-01-31T13:11:11","slug":"cookies-not-working","status":"publish","type":"post","link":"https:\/\/ygo.ro\/?p=129","title":{"rendered":"Cookies not working?"},"content":{"rendered":"<p>Well, when you are working for so long with mvc's and other libraries, one can forgot about the right syntax of row php code. Take for example setookie() which has the same number of arguments under Codeigniter. But the code copied from there didnt wanted to work. Why? Precious time loosed to the fact that in raw pho setcookie need the time to be set starting from January 1 1970, while set_cookie in CI just need the amount of time for the cookie to be active.<br \/>\nCodeigniter<br \/>\n<code>set_cookie(\"latitude\", $this->input->get('lat'), 3*3600);<\/code><\/p>\n<p>PHP<br \/>\n<code>setcookie(\"latitude\", $_GET['lat'], time()+3*3600,'\/', $config[\"domain_name\"]);<\/code><\/p>\n<p>So, brush your basics and ask a friend. Is good to have friends.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, when you are working for so long with mvc&#8217;s and other libraries, one can forgot about the right syntax of row php code. Take for example setookie() which has the same number of arguments under Codeigniter. But the code copied from there didnt wanted to work. Why? Precious time loosed to the fact that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,49],"tags":[50,51,73],"_links":{"self":[{"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/posts\/129"}],"collection":[{"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ygo.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=129"}],"version-history":[{"count":3,"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/ygo.ro\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/ygo.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ygo.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ygo.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}