« first day (929 days earlier)      last day (4005 days later) » 

12:28 AM
1 hour later...
 
2 hours later
 
Good morning guyz ^_^
 
12:58 AM
Hi, what was again that awesome video about programming on youtube?
It was about best practices I think and by google as owner. and it god shared here a lot
 
user895378
@Duikboot There are many of those. Perhaps you're talking about Miško Hevery's talk regarding dependency injection?
 
Yeaaah that's the video Thanks a lot!!! :)
 
@nikic: is there a particular reason for not adding a col number along with line number into the token in Phlexy?
 
user895378
Yeah, that one's a classic IMO; it was my introduction to the benefits of IoC.
 
1:35 AM
my "lead developer" yesterday announced that he has found a stupid mistake in my code: i did not write ?> at the end of my php class files
15
 
awful
did he take 5% from your salary also for that?
 
@tereško
 
user652649
lol lead developer
 
@tereško what a horrible mistake =oP
 
@tereško be sure to use tabs always, you might get fired using spaces
 
1:39 AM
The worst mistake would be naming your class files with the .php extension. We all know they should be .inc
 
@kaᵠ that's another mistake he has mentioned that i have been making, because spaces make page slower
 
no way
 
i am quite serious
 
"And I've noticed a few places where you use entire colons where a semicolon would do just fine"
 
roflmao here, can't stop
 
1:42 AM
what makes it especially striking is that the page in question tends to push around ~1MB (in ach direction) on content in each standard interaction and sometimes the SQL + SOAP stuff takes up to 15 seconds to execute for each of that request
 
@tereško what did you tell him after he told you?
 
nothing
there is nothing you can say to these people
 
Fair enough; and there's probably plenty enough to do without getting into an argument
 
@tereško 1mg of code in 1 file is way too much and 15s exec time also, unless on a pentium1 :P
something's wrong there
you probably know that
 
user895378
@tereško Nice. Just ... nice.
 
1:50 AM
i will finish all what's related to my current responsibilities and will get out of there
 
user895378
Best thing about writing a reverse proxy server? Method names like ...
 
user895378
private function handleDeadBackendSocket($backendId)
 
user652649
@tereško disappointing. i would have expected you punching him in the face :(
 
you know it's time to leave, when you start raging right after you step out of public transport and head toward your workplace
4
 
2:58 AM
ehh ... so i made a small JS utility .. it's purpose was to manage repeatedly execute script, called: pendulum
it was mostly used for the heartbeat script
and i made the mistake of mentioning that it had a globally accessible API through the exports variable
fast forward 1 month: the genius "lead developer starts to put <script>exports.pendulum.pause();</script> at the start of all his piles of HTML that he sends around (and call - ajax) , because "it cause locking"
... of course the lock is caused by his 30 seconds running "ajax" calls that hog the session , but it does not matter
and yesterday the project manager tell me "the warning box about session-soon-ending is not showing up, what did you break ?" .. i look at the code, and someone has messed with the above mentioned utility again
but the blame is on me
 
user652649
3:16 AM
@tereško are them stupid for real to not see it's not your fault, or it is just the classic 'game of thrones'?
 
3:34 AM
Honey, I'm homer
 
user652649
@Hiroto looking for donuts?
 
it's 4:37am... yes.
 
m59
What is good to use for a local php server?
 
4:11 AM
development
though , it depends on your understanding of "local"
having one on the same box as your desktop environment would be a pretty bad idea
but having on visible from your localhost is quite beneficial
 
4:40 AM
@m59, php has one built in for development in later versions
 
m59
hm, thanks
 
5:02 AM
@m59 Good Morning
:)
 
any one knows how can we compare two contacts in php?
i want to compare two contact number in php
suppose my number is 9016126810
and in some device it save by default like (90)16-126810
in some it is like
so is there any standard method to compare contacts ?
 
5:20 AM
@Aamirkhan strip it from unneeded characters, convert to integer and compare
 
@kaᵠ without any RegEx is it possible
?
bcs there are lots of veriation in phone contact number as per contry code,state code
etc....
and device is also having different contact filling method
so i can't apply RegEx here
 
@Aamirkhan of course it is, but regex would be prefered here
 
@Furqi this is issue
@kaᵠ i think i have to apply lot of regEx as per different country
 
@Aamirkhan use regular expression
 
filter_var
 
5:25 AM
not a lot @Aamirkhan
 
@kaᵠ hmm
 
@uınbɐɥs filter_var() with regex :)
 
so finally i think just need to apply regEx right?
@kaᵠ ok thanks i will try and let you know :)
 
ok
 
@Aamirkhan This might work for you
 
5:30 AM
@uınbɐɥs k
 
too late
 
can i hide url parameters (if encryption isnt my choice )
 
user1642018
6:35 AM
is gmail down for you guys too ?
 
user1642018
@m59 wamp
 
Good morning guys! :-)
 
hello
@AmbroseBwangatto gmail is working fine
 
ello
 
user1642018
hi
 
6:50 AM
Do you guys prefer specific PDF maker classes for PHP?
 
@Gordon it happened again I was made an owner for a random room chat.stackoverflow.com/rooms/29182/room-for-lalith-and-fairoz don't delete this one just yet, I should probably open up a bug report on meta otherwise it will keep happening.
 
I did some research and found those 3 PDF classes: pastie.org/private/rhan6luuzl1ivtavjpqg
 
you are not alone @crypticツ
 
7:06 AM
We use FPDF here, it's a little convoluted in some ways but it's quite flexible
 
0
Q: Why do I keep being made a room owner for rooms made from moved messages?

cryptic ツIn chat when a moderator moves messages out of the room into their own room it seems to be making the owners of the initial chat room owners of the new room. This behavior can be seen in this room-for-lalith-and-fairoz. It was recently moved out of the PHP chat, but it made all the PHP owners an...

feel free to edit it
 
@Duikboot We use Fpdf fpdf.org The site doesn't look like much but we can make pretty rich pdf's with this, you can then save, email, output, download them etc. Can use images, page break, custom fonts and a bunch of other stuff.
 
Allright I'll have a look :) Thanks! :)
 
Wow @MarkThompson Fpdf is really easy to use :)
 
7:23 AM
@Ocramius !!!!
hi
 
though i set session variable, clicking back button is still showing the logged in page, how to handle this
 
hi all.
 
Make a check if your session is active.
What page you want to show?
 
ahoi all
 
Hello !
 
7:28 AM
@HamZaDzCyberDeV Howdy!
 
@TheLuckyGoof Did u use session_start() ?
 
tried to destroy session like this in the log in page (to which it will be redirected upon logout) session_start();
session_destroy();
 
@Wes yes it's fine as long you don't install the soft that's delivered with it
@Ihsan Hiii ! fine, and you ?
 
@HamZaDzCyberDeV Fine but a bit angry. PDO is not as good as it is told in encapsulation and oo.
 
So you have a login page, u validate the credentials, and then you create a session. $_SESSION['user'] = $username; for example. When you click on the back button you go back to the login page...
 
7:30 AM
@Duikboot yeah in the page i've loaded data into session variables and onclick of logout, destroyed session in login page
 
@Ihsan lolz, everything has it's own adv. and disadvantages....
 
@HamZaDzCyberDeV Just an oo faker at the functionality level.
@HamZaDzCyberDeV It is a great deception for me.
 
The parameter structure is just opening gates to wizardry.
 
@Ihsan enjoy, since here we're using mysqli
 
7:32 AM
What page would you like to see if a user clicks the back button after login?
 
@HamZaDzCyberDeV Does pdo check for the field datatype when preparing statements?
If so that is the big plus. the rest is crappy.
 
I don't know man, I'm a newbie regarding DB ...
 
Moi aussi. I just use it when I need, delving into manuals...
 
Hey
1
Q: Image upload from smartphone fails

ItamarI've built a website which allows image uploading and once an image is uploaded , some specific information about the photo is displayed. Uploading pictures from computers works just fine , the problem comes up when I'm trying to upload an image from a smartphone. The upload success but it seems ...

 
@Duikboot user is logged in, fills a form(username & password loaded as session variables), redirects to page page where the form variables are inserted into db, at this form page if user click sign out , gets redirected to login page where i've destroyed session. is this the right way
 
7:36 AM
I've built a php website and trying to upload images from smartphones
for some reason it works just fine with Android as it doesn't work at all using smartphones
 
Yes.
 
@Itamar It seems It has some unit problems (width height) at the first glance.
 
Start the session AFTER your validation = done.
But I tought your problem was a user logged in clicked the back button and doesn't see the home page again but has to login again? no?
 
but at the from page if users is clicks signout and clicks back button, the form is still visible, how to prevent this
 
@Ihsan , I don't know what may cause this problem
with Android it works just fine , but uploading from iphone doesn't work at all and I don't know why
Is there any specific attributes that I should set in the uploading form to make it work with iPhone ?
 
7:39 AM
Maybe im a bit wrong but you are still showing the login page after a user is logged in?
 
Hello everyone! I just wanted to tell you that I'm new to Stack Overflow, so if I do anything wrong please tell me :)
 
Welcome
 
@Itamar I really do not know. Look at the filesizes, resolutions, they are not the same, are you sure that is the same file, if yes then it means smartphone modifies it .
 
@Duikboot user is logged in, form is shown. user clicks logout, redirected to login page where session gets destroyed. now when user clicks back button(from login page), form is still shown
 
@Itamar Smartphones no more use pixels. iPhone has retina display blabber, and android uses dp etc...
And that is how deep my knowledge goes into this.
Perhaps you should ask this in iphone chat
 
7:43 AM
Evening everyone!
 
var_dump($_SESSION['yoursession']);
On the form page.
 
@HamZaDzCyberDeV so in the end every one uses mysql : via PDO or via mysqli
 
And see what the results are when you click it
 
morning @Ihsan (have you seen Cloud Atlas?)
 
@kaᵠ morning! yes. I have seen it.
 
7:45 AM
just remembered because your avatar :P
 
@Duikboot null array empty
 
Wachowsky...:P
 
I had to watch that movie, not once, not twice, BUT TRICE to understand it.
 
@NickFury There was nothing in that film to understand at all.
 
@NickFury that movie needs to be separated into 3 timelines anyway
 
7:46 AM
What does the sesison says if you are logged in?
 
guess you can make 3 decent films by cutting it :P
 
@Ihsan That's the conclusion I came to
 
@kaᵠ I guess you can make 3 lousy films outta that lousy film. :D
 
Because when you have no session set after the login ( or something went wrong) it's normal that it's not working properly
 
@NickFury Listening.
 
7:48 AM
@Ihsan c'mon the sci-fi was nice :P
 
@kaᵠ Of course, I bet you can come out with way better scenarios with that shitload of money...
 
lol
that's just the way it is
 
@NickFury The fundamental propositions of the film:
1) Slavery is bad.
2) Homos are good.
 
1. check
 
3) Humans recurse. (re-incarnation)
 
7:51 AM
2. more like 'normal' than good
and the fighting !
 
ok
 
don't forget the action
lol, you got starred on the original one, and removed as it doesn't sound as bad now
 
4. Tom Hanks still gots it
 
Of course. ok. do not star it anyway.
 
and that chick still gots it!
 
7:52 AM
@Ihsan lolz
 
@kaᵠ Drew Barrymore she is top... What a body man.
 
@Ihsan you forgot one big point: we (the human race) will engage in some war that will make use leave our planet and live on another one in the end...
 
PS: I'm too lazy to write the allowed characters one by one, fill the rest :p — HamZa DzCyberDeV 1 min ago
 
@kaᵠ Yes, the classical: The bio-clone slavery is the inethical thing etc. Come on.
 
@kaᵠ what make you sure the war won't follow us there? =oP
 
7:55 AM
@HamZaDzCyberDeV lol
 
bla bla...
 
@Ihsan range() is awesome man
 
Mornings
 
@crypticツ we were talking about Cloud Atlas's plot
 
@DaveRandom Hiii
 
7:56 AM
@Ihsan Don't you mean Halle Berry? :P
 
and things that get into movies again and again and again... etc and again
 
@kaᵠ The thing is we do not need human clones. We reproduce at a pace enough to enslave ourselves because of resource limits.
 
@Duikboot pl check this pastebin.com/xFcLM5FQ thanks
 
morning @dave
 
unless I have to watch that movie a fourth time?
 
7:57 AM
@NickFury Old man bad memory... Yes Hale Berry.
 
@kaᵠ but did they not end up still having a war essentially between two tribes?
 
Hale Berry !!!!!!!!!!!!!! yeah, her !
 
hi all
 
guess so @crypticツ
 
?>

<?php
##sign_time.php starts
<?php
session_start();
session_register('uname');
wut o.O ?
 
7:57 AM
@NickFury I remember her form operation swordfish.
 
@TheLuckyGoof : Never, never ever never store passwords in your session!
You don't need to use session_register.
 
@Ihsan the clone part is sad and true :)) :((
 
@Ihsan YES! Thats amazing, I recently re-watched that movie.
 
$session['user']['firstname'] = $_POST['firstname'];
 
@HamZaDzCyberDeV Err... wat?
 
7:58 AM
@NickFury So you remember the sunbathing scene...
 
@DaveRandom check the source pastebin.com/xFcLM5FQ
 
oh yea
 
@TheLuckygoof
 
@HamZaDzCyberDeV Ahh ok, presumably that's not there in real codez. Maybe not though...
 
Hope so ...
 
8:00 AM
You better can generate 1 session['user'] with your data. And then you can just check if($_SESSION['user]){ Do blah }
 
interrupt request
:
 
@HamZaDzCyberDeV dude... range.. range.. range... yeah, lazy
 
@Duikboot how can i handle showing date_picker.php if he clicks back at login.php
 
@kaᵠ that's the way to go :D
 
@Ihsan remember it? That's 95% why I rewatched that movie and 5% for Travolta's goatee.
 
8:01 AM
@HamZaDzCyberDeV when you're that lazy... maybe
 
@NickFury Lol. That is an overload of man-talk for this innocent php chat room...
 
@HamZaDzCyberDeV if not.. just run the code, get the output, and paste it in the answer ;)
 
Can you first tell me why you are doing this?
for($i=0;$i<$totalval;$i++){
if($_SESSION['uname']==$user_arr[$i]->user_name && $_SESSION['pwd']==$user_arr[$i]->password)
{
echo "success";
header("Location: date_time_picker.php?$encrypted");
}}
 
@HamZaDzCyberDeV more importantly remove your lazy remark
 
@kaᵠ I know, but you know, showing some tricks in answers is sometimes appreciated
 
8:02 AM
Hellow!
 
0
Q: php fetching page using http post

Jinu J DI have to fetch exam results from the page http://cbseresults.nic.in/class1211/cbse122012.htm Sampleroll number is 4623447. They are using http post to post the form data.I wrote the following code to post data.But it is not providing the needed results.I am posting the needed cookies and post va...

 
Duikboot, How do you have only 36 rep?
 
@NickFury We should open a permanent chat room in SO.
 
Thought you had more
 
@dragon112 HIIii
 
8:03 AM
@Dragon112 ? I dunno :p
 
@HamZaDzCyberDeV how about this trick: $allowed='abcdefABCDEF012345'; //lazy too, $allowedArray=str_split($allowed);
 
This deserves way more than 3 stars
 
@Duikboot checking if the user is registered, if yes redirecting then redirect to the page, username is passed through url by encryption
 
@kaᵠ it's 10am here xD
 
Can you exactly tell me why u are using that for loop?
 
8:04 AM
@DaveRandom lolcode always make one lol :))) LOL (first one to star it :P)
 
@JinuJD that's not true, you can send POST request with file_get_contents
 
@Ihsan Hahaha I couldn't agree more
 
@DaveRandom LOL GOOD ITERATION U R THE BEST
 
@HamZaDzCyberDeV :What about my function send_psot
 
@DaveRandom Do you know the littleF*ck language
bit manipulating brainf*ck
 
8:07 AM
@JinuJD seems ok, are you getting an error ?
 
36 rep is more then enough for me @dragon112
 
@Duikboot you're kidding me :(
 
@Duikboot As long as you are happy ;)
 
you get access to the chat right? what more could one want?
 
8:09 AM
@kaᵠ cv, delv etc?
 
have to go. bye folks...
 
Bye!
 
Bye Ihsan
 
@Ihsan take care
 
@dragon112 meh who likes cleaning..
@Ihsan see ya!
 
8:10 AM
bye
agg ghe's gone
 
Anyone here who knows Symfony2 a bit? Got an architecture question: How can I "inject" a bundle class (for e.g. Buzz) from a Bundle controller to the service class. Or in other words: How would I throw $this->get('buzz'); into the service class?
 
@HamZaDzCyberDeV:Ya they say access is denied...Is there any way so that I can emulate request as if from browser
 
@NickFury @Duikboot when I got 2000reps I found it awesome and handy to be able to edit posts directly without it getting reviewed ...
 
@JinuJD headers? but you never can be sure it's not faked.
 
@JinuJD And you're able to access it with your browser ?
 
8:12 AM
yes
 
@HamZaDzCyberDeV I get two points from edits though :P
 
@HamZaDzCyberDeV :Yes I can access it from browser
 
@NickFury That's true, but if it get's accepted ...
 
also true ^^
 
That is nice @HamzaDzCyberDev But the thing is... you have 2 000reps because you deserve it, and I don't deserve them yet because im not advanced enough yet.
 
8:14 AM
you shoudln't edit otherwise !
 
@Duikboot You're fine!
 
@JinuJD strange, I hope the cookie part is working, what once did, I created a separate PHP page and wrote something like
echo ''<pre>";
print_r($_POST);
print_r($_COOKIE);
 
@Duikboot Reputation is not a measure of how good/advanced you are, its a measure of how much reputation you have whored on the site. That's about it.
7
 
Sounds about right xD
 
and I opened the page with the script I created
 
8:16 AM
@HamZaDzCyberDeV: is it enough to send cookie as name = value;name1 = value?
 
lol, kinda
 
@JinuJD: what if you try before you ask?
 
@DaveRandom lolz the first part is true, the second part I'll say semi-true
xD
 
@zerkms:nice idea :|
 
@zerkms I though you never used the chat :o
 
8:17 AM
True, but @DaveRandom I would like to help people with correct information if Im not sure about replying for something I just keep my mouth shut :)
 
@Duikboot I'm also a newbie and I got almost 4K, so don't worry ....
 
@HamZaDzCyberDeV: so you were thinking about me particularly and about the fact that I'm not using this chat? ;-)
 
@Duikboot For what reason? That's why the SO/SE system got community edits :)
 
@Duikboot In that case you have a considerable advantage over most people on the site ;-)
 
@zerkms Hmmm, no. I'm always hanging in the PHP questions, and ofcourse I meet with some of your awesome answers :-)
@Duikboot As long as you don't write crap !
 
8:20 AM
I only dislike I was now trying to help someone but he's not answering anymore -_-
 
@Duikboot I know that feeling xD
 
@zerkms:tested and working fine :D
 
@JinuJD: now you know the biggest programming trick
 
@JinuJD what's in the cookie ?
 
@HamZaDzCyberDeV :jjust value 1...That is the cookie I got after inspecting my browser
@HamZaDzCyberDeV :for that page
 
8:22 AM
@JinuJD No I mean what are you passing ? a SessionID ?
API key ?
@JinuJD I rechecked your Question, you asked about the cookie jar part, did you ask it to me ?
 
@HamZaDzCyberDeV :I got that cookie after inspecting locally stored data by that page..I assume that it is used to ensure that the previos page is visited before submitting form or something like that...see
http://cbseresults.nic.in/class1211/cbse122012.htm
give roll number as 4623447
@HamZaDzCyberDeV: Ya I asked to you regarding cookie jar
 
@crypticツ the way I see it, the permissions are always copies of this room, so whenever I create a room to push away the help vampires, it will have the same owners as here.
 
0
A: PHP - cURL and remote login

HamZa DzCyberDeVUse COOKIEJAR & COOKIEFILE : <?php $ch = curl_init("http://www.example.com/login.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "login_name=xxx&login_pass=xxx"); curl_setopt($ch, CURLOPT_COOKIEJAR, '/cookie.txt'); curl_setopt($ch, CURLOPT_COOK...

Here's an example how to use cookie jar with cURL
 
@HamZaDzCyberDeV :That file is used for referncing the cookie in succeeding requests right?
 
that file is to save the cookie information
you may use it for another connection ...
Ah, and I think you should use ./cookie.txt
I had a problem once that it saved it in the C:\cookie.txt xD
 
8:28 AM
But here I have only one time use of the cookie.So sending with the request is enough??
 
can the windows users in this room please test these snippets and leave a comment to the OP whether they work: stackoverflow.com/questions/16311345/…
 
@JinuJD Don't know, just try it ... And you can always delete it after using it at the end of the script :p
 
boooooooooooooooooring
 
:D
 
@Gordon if it's creating a new room, I would expect the owners to be the people who are part of the conversation. Unless these rooms are some type of sub-room of the PHP chat I don't see why making the owners of original room owners of a room that has no relevancy to them. I opened up a meta question on it. Maybe they can change that behavior.
 
8:30 AM
1
A: php utf-8 decode from xml returns question marks

hakreOkay the following is now a bit rough/verbose, especially as you already tried so much. Just try to keep fresh eyes and consider that once you do only a little mistake with encoding, it is often already screwed. Therefore it is important to properly understand which mechanics are at work here. I...

(with special hugs, love and kisses example for @crypticツ ;))
 
@HamZaDzCyberDeV :One more question,should i set some headers in php.ini for CURL?
 
@crypticツ yes, fully agree. it should be either the person creating the room or the people the room was created for, although the latter is will likely not work because the room name is free text
 
@JinuJD wut ?
there's no need to touch php.ini for cURL
 
good mornings
 
8:31 AM
@HamZaDzCyberDeV : k
 
@iroegbu yo
 
I am new to CURL :|
 
@JinuJD It's just a matter of searching the docs and checking examples on SO -)
 
@HamZaDzCyberDeV s/to touch php\.ini//
 
@HamZaDzCyberDeVv:k thank you...Bye
 
8:32 AM
"Now my web app is ready to lunch."
Haha. :)
 
@JinuJD bye
 
@hakre +1 for spreading the love =oD
 
@Gordon huh ?
 
@crypticツ moar luuv :()
 
8:33 AM
$love++
 
some mods are in the mood for the moar kinky stuff:
Why do you hate us so much that you want to waste our precious time? Tell me which moderator touched you, and show me on the doll where. — Won't 11 hours ago
 
Why am I doing today everything I don't need to do?
 
Maybe a free open question but is it hard to learn ruby if you know php? Or are those 2 different worlds?
 
8:51 AM
@HamZaDzCyberDeV apply the regex to the referenced statement of your to make the statement true
 
@Gordon Today I gave up on regex stackoverflow.com/a/16332892 xD
 
Cool thanks haha that slideshare presentation is awesome.
 
hahaha the challenge accepted part xD
 

« first day (929 days earlier)      last day (4005 days later) »