« first day (1220 days earlier)      last day (3742 days later) » 

12:02 AM
Hmm would using LocalStorage for "cookie purpose" avoid the EU law about cookie acceptence?
 
Unhappy Monday everyone.
@RonniSkansing Is that law still in place?
 
@Fabien lol yea
Id say last 12 month 30% more danish websites have it
and result.. tada.. the users are overwhelmed with info and do not read it
 
@RonniSkansing I don't understand the question. If it's possible for you to do that you are using cookies wrong in the first place.
 
@DaveRandom oh I am not doing anything, it was just a thought I had
 
Seems its opt out for that site
Alert messages shows at bottom
 
12:04 AM
The question is, in EU there is a cookie law. The purpose, a website must disclose for which functionality a cookie holds data
But could that be avoided not using "cookies"
 
"Cookies or similar devices "
 
I wish they would restrict it only to the cookies they're trying to protect the user from
 
@Fabien That document make no fucking sense whatsoever.
> Where the use of a cookie type device does involve the processing of personal data, service providers will need to make sure they comply with the additional requirements of the Data Protection Act 1998 (the Act).
 
Welcome to the EU cookie law Dave
=]
 
12:07 AM
So... if I'm not processing personal data, I have to make sure I stick to the rules about processing personal data?
 
Think anyone actually regulates it?
 
@Fabien in Denmark it is feeable
 
Whose job is it to check though?
 
It'd be pretty much impossibru to police. If you get a complaint, then do something about it
 
if you do not have it on your page. But noone has yet been put in the hot seat
in Denmark it would be a goverment control instance of some kind
dunno about rest of EU
 
12:08 AM
There's literally no way they could prove it was not just a temporary technical problem
 
@DaveRandom there are so many holes, the whole things leaks
in the law.
Entering a website it like signing a contract
 
It's yet another instance of laws drawn up to govern technology by people who don't even begin to understand the technology
 
you might be right
 
It'd be like me drawing up rules about what kind of nuclear fuel you could use in a power plant
 
12:09 AM
lol
Puh been playing around with Angular today...
last day it was backbone..
 
> **CB: So what would you now recommend devs and designers do regarding cookies?**
OE: We now know the ICO audit process is purely ‘visual’, judging websites based entirely on whether they look like they're complying. There's no inspection of cookies, or code, or what the site does. Presumably such an audit hasn't a clue about, say, Facebook using cookies in its Like buttons. All they're looking for is something like a cookie banner or link to a cookie page.
 
=/
Well the upsides, it is easy to sell
 
Either way, it's opt-out at least. So just do it and put a link in the footer it seems.
 
> The Regulations specify that service providers should not have to provide the information and obtain consent where that device is to be used: for the sole purpose of carrying out or facilitating the transmission of a communication over an electronic communications network
Oh it's fine anyway, you don't have worry about it if it's transmitted electronically
Carrier pigeons would still need to carry the warning though
 
lol
 
12:28 AM
Hey Guys i'm just wondering if you could check out and see if there is something wrong with my function. Not because it's broken but because it seems way to simple.
The function is to grab and cache a JSON url
function my_cache_get_event($id){
  $url = 'url';
  $file = __DIR__.'\cache\user_event_cache_id_'.$id.'.json';

  if (time()-filemtime($file) > 24 * 3600) {
    // file older than 24 hours
    file_put_contents($file, file_get_contents($url));
    $json = file_get_contents($file);
    return json_decode($json);
  } else {
    // file younger than 24 hours
    file_put_contents($file, file_get_contents($url));
    $json = file_get_contents($file);
    return json_decode($json);
  }

}
If the file is not there it auto creates it also
 
wow =]
Jack you need to put that in pastebin or something =]
 
Okay sorry
 
ah its no problem, it is there now
 
gist: Grab and cache JSON if it is 24 hours old, 2014-02-17 00:31:29Z
function my_cache_get_event($id){
  $url = 'url';
  $file = __DIR__.'\cache\user_event_cache_id_'.$id.'.json';

  if (time()-filemtime($file) > 24 * 3600) {
    // file older than 24 hours
    file_put_contents($file, file_get_contents($url));
    $json = file_get_contents($file);
    return json_decode($json);
  } else {
    // file younger than 24 hours
    file_put_contents($file, file_get_contents($url));
    $json = file_get_contents($file);
    return json_decode($json);
  }

}
 
but next time, it will surely improve the chance of help =]
hehe
 
12:31 AM
Sorry Ronni
Gist just did the same thing :/
 
noticed, I thought it was funny
=]
 
I ask as examples like this have loads of code which I thought if kind of uncessarry
 
@jack Umm... don't the if and else branches do the exact same thing?
 
Omg
sorry
 
12:35 AM
I knew
There was something
Why it was being slow
 
How old are you jack?
 
@jack I knew*
 
Also do this instead:
 
19
 
lol
Okay okay =]
 
12:37 AM
The reason there was that line in there was because I was testing earlier, to make sure it was working and I forgot to remove it
 
function my_cache_get_event($id){
  $url = 'url';
  $file = __DIR__ . '/cache/user_event_cache_id_' . $id . '.json';

  if (time() - filemtime($file) > 86400) {
    // file older than 24 hours
    $data = file_get_contents($url);
    file_put_contents($file, $data);
  } else {
    $data = file_get_contents($file);
  }

  return json_decode($data);
}
 
Sometimes a pretty young guy comes here now and then, and I forgot his name
I always have a soft spot for young coders
 
Ah cheers man, I really appreciate your help!
 
@RonniSkansing I'm 20+1, do I apply for that ?
 
lol not at all
 
12:38 AM
lol
 
@DaveRandom I like using 24 * 3600 as it lets me quickly controll the hours,
 
ffs, stupid fat fingers
 
Would you consider me same age group as you @Hamza, i am 20+7
 
@jack The trick is, that a day doesn't contain 24 * 3600 seconds
@RonniSkansing I consider you as a senior with your knowledge :)
 
@HamZa Am I missing something but is it not just 3600 seconds ( 1 hour) * hours
I like your code for simplify thought thanks for that I'm going to steal it :3
 
12:41 AM
@jack Well that doesn't really matter, but use forward slashes in your paths because it's portable, and don't do file_put_contents(file_get_contents()); file_get_contents() because it's very inefficient
 
A day is a unit of time. In common usage, it is an interval equal to 24 hours. It also can mean the consecutive period of time during which the Sun is above the horizon of a location, also known as daytime. The period of time measured from local noon to the following local noon is called a solar day. Several definitions of this universal human concept are used according to context, need and convenience. In 1967, the second was redefined in terms of the wavelength of light, and it became the SI base unit of time. The unit of measurement for time called "day", redefined in 1967 as...
 
@HamZa wow, thanks. You too..
 
> A civil clock day is typically 86,400 SI seconds long, but will be 86,401 s or 86,399 s long in the event of a leap second.
That's also why we have leap years
 
Thank you DaveRando and Ronni, I won't ping you encase your working so wouldn't want to interrupt, so hopefully you'll see it here!
 
Well I did nothing :) np
 
12:46 AM
Well you spotted that line which was causing major inefficient on my website due to not using the cached version :p
 
I think it was Dave =]
and I am just talking some time to enjoy myself by the computer =] chatting, looking at code etc
 
Oh gosh it was! DOuble thanks then I'm off to bed got lectures in the morning thanks for your help 1 more time!
 
Sleep tight
 
Wow I just got an upvote on an answer from about one year ago and I'm thinking "What in the world did I write ?" ; It's soooo bad
 
Hmm
The word google should be replaced with search in all context not referring to google, I would love that
DoubleJacks..
 
12:58 AM
@crypticツ it's a string list, seperated by ;'s
 
It did not deserve -2 @HamZa
 
@RonniSkansing regex/html haters
 
How can anyone resist the regex ;-)
 
The accepted answer abuses XPath btw
//img == getElementsByTagName('img') :)
oh ... right
not quite awake yet
 
1:05 AM
I'm doing this:
$options = array(
	'http' => array(
	'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
	'method'  => 'POST',
	'content' => http_build_query($charcoaldata),
	'ignore_errors' => true,
	),
);
$context = stream_context_create($options);
print_r(json_decode(file_get_contents($charcoalinvurl, false, $context)));
But nothing gets print_r'd.
Ideas?
 
You don't need the \r\n behind the header value.
Also, you have ignore_errors set to true, perhaps you should switch that off for now.
 
Hmm, I've had two down votes for the same answer. I think the second is just somebody jumping on the band wagon from the first guys comment. I don't think the first comment is relevant to the OP, although he has a point and I made an adjustment to my answer. Just wondering if there is a problem with it. stackoverflow.com/a/17065451/212940
 
1:21 AM
I see no problem
 
No, me neither. Just wanted a second pair of eyes. Ah well, forget it and move on I suppose. That's SO for you :)
 
I guess, atleast it not downvoted anymore. The 3v4l paste is fun
different outputs around 5.3 to 5.34
 
oh yeah. They're months different. Hadn't noticed that. I wonder why?
 
@DaveRandom That is odd. It seems to overflow
Editing as text in chrome and disabling edit mode fixes it
That's just stupid :(
 
@RonniSkansing Seems to be the setTime causing it 3v4l.org/7SfZK
 
1:28 AM
yea can not argue with a paste like that =]
-1
Q: Notice: Undefined index: cats

v123shineI am newbie with php. I'm getting this error "Notice: Undefined index: cats". Notice: Undefined index: cats in C:\htdocs\wp\wp-content\themes\wp\inc\widget\postwidget.php on line 115 Here is the content in line 115: <p> <label for="<?php echo $this->get_field_id('cats'); ?>"><?php _e('Sel...

hehe, no need to click it ^
i just loled at the title
 
3v4l.org/OsviA is the same (as in different) :)
But setting the time in the constructor works fine. 3v4l.org/HqSEv ????
 
0
Q: Debugging GRP in php - how to get errors to show?

Eliptical viewHow do I get php to stop on a fatal coding error inside a GRP (Get-Redirect-Post) segment, so I can see the error message without the subsequent redirect hiding it? if($_POST) { BAD CODE header("Location: ". $_SERVER['REQUEST_URI']); die; // Redirect & GET } What happens is that when ...

GRP?!
 
lol
 
Glass Reinforced Plastic?
 
1:38 AM
lol @RonniSkansing
 
1:56 AM
you guys have so many internet points... so how does it feel?
 
it feels like we've wasted many hours of our lives.
 
not as much as a script kiddie doing port scans for another script kiddie =]
I think you might have helped some people in the process
 
well, sure :)
 
2:42 AM
@PeeHaa haven't created it yet
shall get on that
 
@Lusitanian hey buddy
long time
 
long time no talk how are you
@PeeHaa augh stupid whois privacy is on so i don't have the right email to verify the domain with them
 
I had just started learning Dvorak layout (first lesson), stepped out for a while and came back to the lock screen ... without an option to change the layout back to US Standard =/ thanks Apple!
 
@Jack If you're on 10.9 there should be an input menu in the top bar.
 
@Lusitanian i am good how are you ? Thanks
 
2:51 AM
@Undo What's 10.9 called? I'm on Mountain Lion I think.
 
@Jack 10.9 is Mavericks
 
Yeah well, I'm not on that.
I've managed to fix it anyway, it just doesn't seem to be the default.
 
@NullPoiиteя good, thanks. what have you been up to?
@PeeHaa RESPOND TO ME
@PeeHaa peehaa@phpoauthlib.com good?
 
3:05 AM
blah
 
@PeeHaa sent the cert/key
 
3:22 AM
blah...
@ircmaxell could you supply with a good argument for lowercase true/false in php contra uppercase?
Iknow it is a pretty silly question, but we talked abit about it ealier today, and the only real argument that came fourth was "quality php programmers use lowercase, as such, so do I". I checked abit of your code ealier and noticed you use lowercase =]
Maybe you have another reason more then just preference
 
I don't like using either the Caps Lock or keeping the Shift key pressed while typing true, false and null :)
 
^ actully to be honest that was actully mentioned
And I could consider that a valid point =]
I think one could argue for uppercase is that true and false resembles constants, even more then magic constants imo
 
3:50 AM
@Jack on that RPG question.. maybe the user could just make sure there isnt missing variables with isset and throw exception or whatever?
 
@Lusitanian just preparing for other exam for job
 
@RonniSkansing Of course they can, but it's just an example; from what I understand, OP just wants a way to stop the application if any warnings are raised.
 
Yea, and it appears he has huge trouble with something that could have been as easy as isset($x) or die('halleluja')
I mean the usecase seems pointless. "I might be missing a variable. so lets raise warnings to errors and throw a exception to log it"
I do not get the other answer... like it makes no sense to the clear cut of isset or just checking out for common warnings that should not occur or not be unchecked
from Eliptical view himself...
 
Yeah, their own answer really doesn't make any sense.
I do, however, like the mode wherein notices are promoted to exceptions.
 
Yea it is lovely for what you describe in the great answer
I just fear that the complete logical is running by the OP
ill add a comment
 
4:01 AM
We'll see :)
 
and go to bed
 
4:13 AM
nn
 
4:33 AM
anyone there?
 
where?
 
@Jack can you help me integrate google sign in to a website?
 
Can't you do it yourself?
 
@Jack i have been trying it for 2 days
 
And what have you got so far?
 
4:39 AM
@Jack what is $google_redirect_url?
 
It sounds like a resource to which the user is returned after signing in to Google Accounts.
 
morning
 
Hmm what do you guys think of this. Am I way off ?
http://stackoverflow.com/questions/21820762/compare-2-arrays-in-php#21820792
 
way off what?
you are Nathan Srivi?
 
I got a gold badge in ZF now. lol
 
4:52 AM
@andho what lol =] I meant, do you think it a great idea to answer such questions
 
havent used ZF in two years or something
 
@RonniSkansing ask Jack @Jack
two jacks around!!!!
 
oh I see, it wasnt meant to stick to that answer but to the question and the comments in top
 
but really no, this question should be closed
 
5:08 AM
hi friends,i want to set cronjob to run a php file in localhost.
this is what i have tried
* * * * * /usr/bin/wget -q http://localhost/index.php
after saving this i tried to open http://localhost/index in browser but nothing happened,please help me
 
@RonniSkansing To link a particular comment, you should click on the time of it and then copy/paste that link from the location bar
@andho No, there's one "jack" and me ... case sensitivity matters =p
 
5:33 AM
any body here to help me?
 
hi friends,i want to set cronjob to run a php file in localhost.
this is what i have tried
* * * * * /usr/bin/wget -q localhost/index.php
after saving this i tried to open localhost/index in browser but nothing happened,please help me
 
6:21 AM
WTF is with Android people and wanting to upload crap in base64? Have they never heard of HTTP file uploads using, oh, I dunno, industry mfing standard multipart/form-data?
 
One of the multipart/form-data formats uses base64 transfer encoding :)
 
Yes, but why are they worrying about it?
 
iono
 
Java's not broken enough to lack basic "here, HTTP post this file attachment kthx" libraries.
I'm so glad that isn't as bad as . It's hell in there.
 
Wait, are you saying that Java supports file uploads "natively"? </sarcasm>
 
And by the time more details are added to that question it will be OT for yet another reason :)
 
@Jack So I decided to look, and as I expected... yes, it lacks any native HTTP anything support, with the most common suggestion to use some class libraries supplied the by an Apache project.
And yes, I know, sarcasm tag, but I wasn't completely sure.
 
I had not heard of Ecmascript for XML before .. cute =]
Rejected .. but cute.
 
@Jack Reminds me of Facebook's XHP, both fascinating and downright horrifying.
 
Downright stupefied by the comments on that article =/
Some people should be banned from Facebook Comment.
> M here for ahumble request,, plz report ds
person becz he is using fake id, the id he isusing is mine n he
hacked my id,, n nw using for the same purpose to hack theid of my
frd n chatng n abusng hm too,,,plzzzzzzzz report ths person so that this
id should b blocked plzzzz help me frdzzzzz...
I mean ... seriously?!
 
Jes
6:37 AM
hello friends
 
Jes
Good morning
 
1 message moved to bin
2 mins ago, by Jack
@Jes http://room-11.github.io/#dont_1
 
good morning
 
user1994804
Following the advice here: stackoverflow.com/questions/409999/…
 
user1994804
6:47 AM
With this: $ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}"));
echo $details->city;
 
user1994804
I get: Notice: Trying to get property of non-object in
 
user1994804
... on line 34
 
4 messages moved from JavaScript
 
^ you've saved your hat?
 
$details is null. @YourAdrenalineFix
 
6:50 AM
@YourAdrenalineFix Your json_decode failed. If the value from the result of it is null, call json_last_error to see if something went wrong.
 
user1994804
Hi @Jack and @Charles Thanks for chiming in. I still dont understand
 
user1994804
<--- VERY Novice with JSON
 
your issue has nothing to do with json
 
Hmm, how about you just do var_dump(file_get_contents("http://ipinfo.io/{$ip}"));
 
^^ Very those two.
 
user1994804
6:53 AM
Thanks Jack, Im investigating now
 
user1994804
Heads up everyone
 
user1994804
This is what I get with var_dump: classifieds.your-adrenaline-fix.com/add.php
 
user1994804
but echo $IPDetails->city; doesnt return the city
 
Jes
hello friends
i am trying to submit a form with an ajax call
 
user1994804
6:58 AM
No idea what to do...
 
Jes
and on success trying to load a div
i got a sign up form in cakephp which i m trying to submit with an ajax call to load the next view after the form is submitted, In my case the form gets submitted but it takes a while like 5 mins to load the next page which i do it on success, i m trying to load a div
 
user1994804
infact using var dump changed the css of the page
 
user1994804
and it shows the results as being labeled "city" but I cant retrieve and store it in a variable
 
^ enclose that in comments <!-- .. -->
 
7:01 AM
@YourAdrenalineFix Weird, file_get_contents() on that URL gives me a normal JSON doc
Oh .. I think I know what's wrong here.
 
user1994804
Sweet
 
user1994804
Plz do tell
 
Just a sec
 
user1994804
np Take yer time
 
It controls how file_get_contents() identifies itself to the server.
 
user1994804
7:05 AM
Ok...
 
user1994804
Read that...
 
user1994804
But dont "Get It"
 
Oh
The server response depends on which browser is asking for it.
 
user1994804
Ahh
 
user1994804
Thats what I sorta gathered from the article
 
7:05 AM
So if PHP pretends to be a desktop browser, you will get the "full results"
 
user1994804
But... II dont know a course of action
 
Try ini_set('user_agent', null); before the request.
 
user1994804
the full results are fine during dev but why cant I access echo $IPDetails->city??
 
Because the full results is in HTML
 
user1994804
Will do... Just a sec
 
user1994804
7:07 AM
Ahhhhh!!!!!
 
user1994804
It just Clicked
 
user1994804
@Jack, YOU are A Genius My Friend
 
user1994804
are you on Google+??
 
I'm in this channel / room :)
 
user1994804
:(
 
user1994804
7:10 AM
Was hoping to connect on G+ for long term networking
 
user1994804
but NP
 
user1994804
Huge Thanks for setting me straight
 
user1994804
But.... If you access that page I sent a link to... What is: string(249)
 
It's part of what var_dump() outputs.
It says that the variable is a string of length 249
 
user1994804
Ahh
 
user1994804
7:13 AM
One other thing...
 
user1994804
 
user1994804
I dont understand how to implement: You can also specify /geo to get just the geolocation information, which will often be faster than getting the full response.

$ curl ipinfo.io/8.8.8.8/geo
 
Oh, how about that .. you can force JSON response by suffix /json
 
user1994804
Ive never seen $ curl ipinfo.io/8.8.8.8/geo in my code
 
That's a command line example
 
user1994804
7:15 AM
replacing 8.8.8.8 with my or a visitors IP
 
either way.
 
user1994804
where would I specify "geo"??
 
It's part of the url.
 
user1994804
You're a bad Ass
 
user1994804
;)
 
user1994804
7:17 AM
Muahhhaahaha Plz give it a whirl and lemme know if it outputs the correct city you're in
 
Hi all techies...
 
user1994804
7:34 AM
Hey @Jack, Oddly Working with: "http://ipinfo.io/
 
user1994804
Should it be: "http://ipinfo.io/$IP or as it was "http://ipinfo.io/{$IP}??
 
user1994804
both work but I dont know which is best or correct
 
Morning
 
@YourAdrenalineFix It should work either way, but do note that $_SERVER['REMOTE_ADDR'] may contain values that you don't expect :)
 
@Jack I remembered time when I was relying on REMOTE_ADDR. G... Bad old days.
 
7:46 AM
mornign
 
Yeah, nasty stuff
Nastier still the dubious X-Forwarded-For :)
 
I don't use them for anything in my code. I log the whole header in a case something goes wrong. I feel safer like that.
 
@Lusitanian was dah? alias or real inbox? cool btw
@Lusitanian tnx!
 
Good morning! :-)
 
@Duikboot mornign
 
7:59 AM
morning PeeHaa Duikboot Leri
 

« first day (1220 days earlier)      last day (3742 days later) »