« first day (966 days earlier)      last day (4207 days later) » 

15:00
I have 1 table and it having value as http:\\www.google.co.in and I am quering this sql query SELECT * FROM tbl_url WHERE url = 'http:\\www.google.co.in' but it gives 0 rows
Can anybody tell me what is wrong in this query
@YogeshSuthar Why are you prefixing your tables with tbl_ and why are your slashes the wrong way
@PeeHaa埽 One of my senior has told me that tables should be prefixed with tbl_, that's why I am using in this way. And I am storing the url in table.
@PeeHaa埽 It gave me result when I used this query SELECT * FROM tbl_url where url = "http:\\\\www.google.co.in"
with double slashes
ffs
0
A: how to decode JSON array in php

DasunUse json_decode function to get the job done. The json string being decoded. This function only works with UTF-8 encoded data.

@BenjaminGruenbaum Almost as bad:
http://stackoverflow.com/questions/17000248/creating-a-json-array-using-concat-with-mysql/17000346
and btw how do you do that preview of questions please?
@Danack WOW
@Danack It's called one-boxing, usually it 'just works'. Try removing everything after the /... including in your link
15:14
"Ha! We group_concat complete xml structures directly from mysql. Don't let him scare you."
0
Q: Creating a json array using concat with MySql

NormanI'm creating a json array from MySql data using concat like this: $id = '5705'; $sql = 'select concat("{""type:""colName"",""id"":""$id""}") as myJson from table where etc.; $stmt = $conn->prepare($sql); What's happening is, instead of getting data from colName from the table and the value of...

ah - cheers
Then people don't get why PHP has a bad rep :P
Yeah, now I'm really on
@MadaraUchiha Welcome. Now you can destroy Konoha :P
@YogeshSuthar Why settle for Konoha when I can have the world?
How up-to-date are you?
The moon plan :D
15:39
@YogeshSuthar So, anime basically?
Do you read manga or not your thing?
I'm getting a JSON back from google with unescaped double quotes which means it's invalid JSON. What can I do?
report it to google as bug
sup?
@Gordon Do my eyes deceive me?!
I haven't seen you here in like a month, where have you been?
@MadaraUchiha a month? I was just on vacation for nine days
15:51
@Gordon xD
Is a mod on SO allowed to take vacations?
What of the flags? WHAT OF THE FLAGS?!
ingledore a flump dump
@PeeHaa埽 Everyone needs moar websockets
@MadaraUchiha I told the SO mods I would be away. No one complained. So I guess, it's okay ;)
@phpNoOBఠ_ఠ Re VPS Hosting: I am happy with Host Europe.
teresko: actually, it was my fault (which makes more sense), but I'm having trouble decoding the JSON. It has " which is being read wrong by json_decode.
@crypticツ the search has ended. I am back from vacation.
16:01
@YogeshSuthar Yes that's because you are using a special charcter
@DaveRandom Finally somebody who talks sense
@MadaraUchiha I am reading manga every week.
@YogeshSuthar Oh good.
May I suggest you Anime & Manga?
1 message moved to Trash can
hehehehehehehe
huehuehuehue
Ah damnit I always forget you cannot trash trash messages :P
16:16
@PeeHaa埽 BUAHAHAH that was my plan all alone
@MadaraUchiha I am only get time for Naruto. :(
@Gordon Where did you go?
@YogeshSuthar We have Naruto questions there as well
Give it a try, it's a Q&A site just like Stack Overflow, only for anime and manga :)
@MadaraUchiha Okk. :D Created.
@MadaraUchiha you are mod there. :)
@PeeHaa埽 Let's manipulate more dom with jQuery! It's way better than separation of concerns..
@YogeshSuthar Shhhh don't tell teh secret
@BenjaminGruenbaum You should totally use jQuery. It's cool and does lots of stuff
@MadaraUchiha I had a nasty bug last week that originated in forgetting to include both jQuery and jQuery.min
@BenjaminGruenbaum Kids these days think they can solve any freaking thing if only they throw enough jquery at it
16:24
@BenjaminGruenbaum first Hamburg to see Eric Clapton, then one week Finca in Mallorca
@PeeHaa埽 Which is completely true!
yay 4 edits to make up that sentence
@Gordon Sounds pretty awesome! I'd love to see an Eric Clepton concert. I don't know what Finca is, but assuming I can trust Wikipedia that seems pretty fun and relaxing too.
@BenjaminGruenbaum it was :)
@PeeHaa埽 The problem is (but it's getting better!) that people don't separate concerns at all. It sounds like the same problem php was (is?) having with people mixing their presentation with business logic in templates.
16:28
@BenjaminGruenbaum I do agree that people don't separate their concerns correctly, but saying that is the problem when suggesting jquery while OP is asking a question about PHP/MySQL is just stupidness :)
@PeeHaa埽 Suggesting jQuery in general is just stupidity most of the time.
Fak it I give up fixing moronic sentences and typos in what I type for today
@BenjaminGruenbaum True that
Good bye all time to sleep. :)
@PeeHaa埽 lol man you work so hard getting these posts down :D
16:38
@ShadyAbdAlrahim I really don't have to try hard to find those. Basically just posts from the front page :(
@PeeHaa埽 ahahahahha, that's funny man
do i lose reputation if i answered one of those questions?
Anonymous
@ShadyAbdAlrahim It depends on you answer
Anonymous
16:43
If it is useful, you get upvotes, if not comes the downvotes
@ShadyAbdAlrahim If a question is deleted and your answered it and got upvotes you will "lose" your rep gained from it
Hmm i understand, but sometimes i'd answer a kinda "unintelligent" question, cuz those who asked it maybe very desperate
@ShadyAbdAlrahim I'm sometimes in desperate need of money. That doesn't mean I'm going to rob a bank ;)
@ShadyAbdAlrahim That is referred to as "Reputation Whoring" or just "Rep Whoring".
Anonymous
@PeeHaa埽 lol completely different analogy :)
16:46
Also @PeeHaa埽 don't preach, we all did the at some point :P
@PeeHaa埽 i wouldn't either on a personal perspective.. but some people would, that's why i would give them a tip xD
Anonymous
@MadaraUchiha not quite!
@MadaraUchiha huh? Have you read the discussion?
Where do I preach?
I can distinctly recall you were nicknamed "RepWhorePeeHaa" or something similar.
@MadaraUchiha you mean answering lame questions is reputation whoring?
16:46
@MadaraUchiha Again have you read the discussion
I'm not saying anything about asnwering questions
:P
@phpNoOBఠ_ఠ Rep Whoring? Point me at one who wasn't a rep whore in his early days
And if you say "Me!" I will smack you in the face with all 5 digits of my rep.
ahahahahahaha :D i wish i can learn to be one
@ShadyAbdAlrahim Rep Whoring is done by answering easy questions that you know that were answered before a million times, and yet you answer for the easy rep
@MadaraUchiha and is that considered illegal? or is it just a cheap way?
@ShadyAbdAlrahim It isn't illegal
It's frowned upon when the "offender" is a high rep user
Anonymous
@ShadyAbdAlrahim It is subjective. If you are always keep looking for too easy/ too localized questions, and you keep answering them, that would make it rep whoring, however if you sympathize with nebiew and just keep extending a hand, it is perfectly ok with me.
@PeeHaa埽 What's so funny? :P
16:51
@PeeHaa埽 I do believe that only room owners can view that
Not sure though
@ShadyAbdAlrahim can you see the link @PeeHaa埽 posted?
hmmmmm
@phpNoOBఠ_ఠ are you an administrator or a moderator here?
@MadaraUchiha nah it says it's removed
@ShadyAbdAlrahim None of the above, he's a room owner
Anonymous
@ShadyAbdAlrahim neither
Meh at least the room owners can appreciate it :D
16:51
Which means he has special access to this chat room
Anonymous
@MadaraUchiha not all people who answer too-localized questions are rep whoring. that was my point
@Gordon on the other hand, (or any other users whose name is blue in chat), is a moderator
@phpNoOBఠ_ఠ Of course not, people who do so repeatedly, usually d.
so have you guys tried working on one project all together before?
@ShadyAbdAlrahim Not really. But some people in here have been working on some project at some point
16:55
I wish i can work some professional group, that would teach me a lot!
@ShadyAbdAlrahim Pick an open source project and start contributing
@PeeHaa埽 do you have any examples of an open source project? like any sort of current open source projects going on now?
@PeeHaa埽 fire away, it's -3
@ShadyAbdAlrahim Most of the people in here have a github account :)
@ShadyAbdAlrahim What are your strong languages? Or what languages do you want to learn?
Anonymous
16:57
I'm really starting to hate answering SO questions. My last answer was 5 days ago. I Wish the hate came after 10K :/
First and foremost, if you don't have an account there yet, open a github.com account, and learn all you need to know about Git
@MadaraUchiha i work with HTML, CSS, Jscript (not professional at it), want to learn JQuery, Ajax, and i'm good with PHP not the PDO one the regular one
@phpNoOBఠ_ఠ Hmm?
@ShadyAbdAlrahim "The PDO one"?
Anonymous
No, he said the other one. So, it must be mysql_ @MadaraUchiha
PDO is a class inside of PHP
16:59
@MadaraUchiha yeah i watch people using new syntax and new semantics in php with something called PDO, which i haven't worked with at all, yet i have worked with the common php that people use..
PDO = Php data object right?
@ShadyAbdAlrahim PDO is a class used to access a database
Anonymous
@ShadyAbdAlrahim There is only one PHP. PDO is just a library of it. It does not change what PHP is or is not.
Anonymous
a library, module, API ? @MadaraUchiha which one is correct?
@phpNoOBఠ_ఠ You can call it a library, I guess, it used to be an extension
Basicaly @ShadyAbdAlrahim, the point is that mysql_* functions are horrible old and deprecated
Do not use them, learn another database access library
17:02
hmm i have no idea what it is though, but i see people writing a whole other syntax on it
Your options are mysqli which is similar to mysql_*, or PDO, which is preferable, because as a professional you'll be using that.
@MadaraUchiha mysqli and mysql are deprecated?
@ShadyAbdAlrahim mysql is deprecated
mysqli is not
@MadaraUchiha i see! i also heard about preg and ereg functions one of them was deprecated :/
@ShadyAbdAlrahim ereg is deprecated
17:04
@ShadyAbdAlrahim ereg is deprecated, preg is recommended.
@MadaraUchiha how do they deprecate these stuff :/ ! those people never give up?
@ShadyAbdAlrahim What do you mean?
Anonymous
@ShadyAbdAlrahim I was like you,(if not worse) when I joined SO. In-fact, So noob, that I did not know the difference between apache/mysql/php. But, all of these good people taught me so much in an incredibly short time. If you stick around in this room, you'll learn a lot.
@phpNoOBఠ_ఠ True dat
While I didn't reach here as a total noob, I did learn a lot in this room
@phpNoOBఠ_ఠ I aint leaving this neighbourhood i like it :D homies for life (P.S. I'm white)
17:06
@phpNoOBఠ_ఠ very true ... very helping for me too
In the year I've been here, I've learned more than I have in the 6 years before.
@MadaraUchiha what about github that you've told me about?
@ShadyAbdAlrahim Learn about Git first
First 3 chapters are a must, I recommend you read everything in there
It's really light reading and well focused
Anonymous
@MadaraUchiha Same here. Did you hear about my latest adventure? I am ditched apache + shared hosting, and started hosting on VPS server, with CentOs, running Nginx doing yum from putty. And, I got all this idea from @DaveRandom in this room.
@MadaraUchiha true ..... and i even got email for 3 job ... and 2 for project ... however doest work on any project nor interested in job
17:11
@phpNoOBఠ_ఠ Sounds good, how's that going for you?
i may sound noob now, but is git like a language on its own? or is it a program or what is it exactly :/? and what does Git stand for?
Anonymous
@MadaraUchiha I am learning new words everyday. So far so good.
@ShadyAbdAlrahim Basically Git is a version control system (or VCS), it helps you to not lose your changes.
@phpNoOBఠ_ఠ ohhh .... awesome @daveRandom
more like a teamviewer or a conference program but for coding and development right?
17:13
You make changes to your code, save, commit your changes to Git, and Git can generate a history of commits for you, in a way that you never lose anything.
Also, Git is awesome for teamwork, you can create branches for different features etc.
Please read the link I gave you
You can finish the whole thing in an hour or two, and it's very informative
Anonymous
@NullPoiиteя yep. totally a nice guy.
i will read it i promise
i am downloading it as pdf
i can actually write down notes in my copybook while i do it
After you finish with it, try it out on an actual project, or on a test project
I use Git for every single project I'm on
Small, large, it doesn't matter, Git is a necessity for every project.
17:15
@MadaraUchiha what if my skills are low for that? :/ you think i'd still learn?
@ShadyAbdAlrahim Absolutely.
Git is very simple to learn
@MadaraUchiha Lucky you. I still have some legacy projects in svn
Also, common IDEs support it well
@PeeHaa埽 Sucks to be you then :D
Hello Everyone :)
17:16
I need a lil help about my sessions again :/
Session_id is not getting refreshed on logout :(
Anonymous
@CodingNoob :(
@phpNoOBఠ_ఠ i just visited ajax
@phpNoOBఠ_ఠ you were not there
@phpNoOBఠ_ఠ it's diff. not that old one
Anonymous
@CodingNoob you can ping me in there
@phpNoOBఠ_ఠ o.O how
@CodingNoob Your logout page should have session_destroy() called before you send any output
Anonymous
17:17
So, what is the problem
@MadaraUchiha yup i have
Anonymous
@CodingNoob you can ping me, starting with the @ sign, like you are doing now
@CodingNoob what happened ? what exactly are you doing ?
And that still doesn't kill the session?
@NullPoiиteя let me pastebin it
17:18
Please do
sure :)
m59
m59
Anyone here familiar with the proper persistent login implementation that uses the username/token/series identifier?
i really appreciate those people who pastbean code instead posting here
yesterday, by PeeHaa 埽
@CodingNoob http://pastebin.com/ however i don't see any error reporting / exiting or var_dumping as per my suggestion
17:20
@PeeHaa埽 i really appreciate you too :P
there you go guyz
@PeeHaa埽 yesterday :O i was not around
@CodingNoob your code is vulnerable to sql injection
Anonymous
@PeeHaa埽 actually, I fixed yesterday's problem.
You were around when I told you to do those thing and yet you still haven't implemented it.
I'm pretty sure I told you to exit redirects
@PeeHaa埽 dude that was other project. & Thanks to @phpNoOBఠ_ఠ
17:22
@CodingNoob I'm not your dude pal
@NullPoiиteя so :/
And some rules apply on every project
@PeeHaa埽 get aside if you can't help :)
@CodingNoob Get out if you are being ignorant
I see there is a AJAX room...
ignore
Anonymous
17:24
PHP should have had a redirect function, not involving sending headers.
@phpNoOBఠ_ఠ it has ;)
Anonymous
@PeeHaa埽 let me see it, or it didn't happen :)
In all honesty it is in PECL, but meh :)
Anonymous
So I was right. It didn't happen!!
Anonymous
Interesting though
Anonymous
17:27
I never read about that section of the manual
I just hate it that every question about javascript gets the answer: "use jquery". That's just stupid
1 hour ago, by PeeHaa 埽
@BenjaminGruenbaum Kids these days think they can solve any freaking thing if only they throw enough jquery at it
@PeeHaa埽 throw new jQuery;? jQuery is not an exception class.
17:34
This is why it won't work.
Anonymous
same here. That is why, I am still refusing to learn jQuery, even though I have tons of tutorials in my PC. I like to learn and excel with Js and Ajax before moving to jQuery. Then learning will be a piece of cake.
sudo jquery fixes everything.
@vascowhite More like rm -rf
@PeeHaa埽 you forgot the sudo
@phpNoOBఠ_ఠ It's not necessary to learn to do the ajax cross-browser stuff yourself....
17:35
@vascowhite I'm root biatch! :)
@vascowhite this will cause a kernel panic ;-)
@PeeHaa埽 Then you can make your own sandwiches
ow yeah :D
@vascowhite no, I'll use sudo -u not_root make sandwich
17:37
@phpNoOBఠ_ఠ Actually, the only thing I ever do exclusively with jQuery is AJAX.
m59
m59
so, I'm in this debate about why to use a session rather than just a cookie/db
anyone have thoughts?
@m59 Depends on your requirements
@m59 about what?
m59
m59
I have a secure persistent login feature using cookies
Anonymous
@MadaraUchiha Well, I will surely move to jQuery, but still would love how things work without having to rely on jQuery. It is not that I don't believe in the awesomeness of jQuery, just trying to learn more I guess.
m59
m59
17:40
say the user opens the browser and visits the site, the cookie will need to be checked with the db
Anonymous
I saw, how jQuery makes working with AJAX easy, I was like wft!!
m59
m59
this part just can't be hacked, trust me.
@m59 Have you implemented the better remember me cookie?
Anonymous
PLB
PLB
17:41
What if cookies are stolen? :)
m59
m59
It can't be.
or brute forced
@phpNoOBఠ_ఠ That's a good way of thinking.
@m59 it can ...
@m59 sure it can
m59
m59
that would be like 1/10000000000000 that someone managed that
17:41
cookies are just files stored on client
m59
m59
Yes, and my check is going to ip ban them
@m59 Is that so/
I can easily steal your cookies if you visit a page I control
m59
m59
Oh, you mean worst case, yeah, well than can't be avoided
All you need to know to make a secure peristent login is here: jaspan.com/improved_persistent_login_cookie_best_practice
m59
m59
but I'll catch it
17:42
I can easily steal your cookies if you visit an unprotected WiFi I'm also in
@MadaraUchiha AJAX is dead simple, even without jQuery.
And you will not catch it
m59
m59
Yes, I definitely will
Your script will identify me, the attacker, as the victim
m59
m59
because I followed that example that was just linked lol
17:43
@BenjaminGruenbaum yes, ajax in modern browsers... but not ajax in IE6 for example...
jquery bids a shorthand crossbrowser solution here.
@bwoebi There's a simple solution to that problem :P
@m59 If the debate is sessions vs cookies/db, the discussion is wrong, and will not go anywhere
@bwoebi What so different about ie8 (in regards to e.g. ie9)?
m59
m59
It doesn't matter who the victim is...
You were at -9 and I don't like odd numbers, so -1 from me :) — vascowhite 31 secs ago
m59
m59
17:44
sigh
@m59 Cookies and Sessions are used for two different things
m59
m59
yes, I get this.
@NikiC only support gecko and webkit, yeah :-P that's what I do (when not strictly necessary) (and perhaps IE 10)
There's no point debating which is better, because they aren't used for the same purpose.
Anonymous
-11
A: Javascript - add select programmatically

WooCaShUsing the popular jQuery library for JavaScript, you could do that like this: var select = $('<select name="drop1" id="Select1">' + '<option value="volvo">Volvo</option>' + '<option value="saab">Saab</option>' + '<option value="mercedes">Mercedes</option>' + '<option v...

17:44
Even if they are similar
Anonymous
Look what you guys have done :)
@phpNoOBఠ_ఠ wtf, -11...
@bwoebi Yeah, great idea, let's include 80 friggin kilobytes of code just to perform var ajax = function(url,callback){ var a = new XMLHttpRequest();a.open(url,"GET");a.onreadystatechange = function(){ if(a.readyState === 4 && a.statu === 200){ callback(a.responseText);}};};
@m59 Also where's that link? I never saw you post a link
m59
m59
The question is simply why use a session, when I could just check the cookie/db on every page load and set something like $auth = true?
17:46
@m59 That is what a session is ;)
@m59 Because it's stupid
m59
m59
:(
That's exactly what a session does for you.
m59
m59
but you can't steal a php variable.
@bwoebi Tada, now you can have your precious ajax("url",callback) , no need for 80 kb of code.
17:46
@m59 Create a session on your site and watch your cookies
Anonymous
@BenjaminGruenbaum good point.
@MadaraUchiha That's what I was trying to tell him -_-
@BenjaminGruenbaum It's not as if this would be the single feature of jquery I use. when I use jquery my other code gets also shorter^^
@m59 How does PHP know who you are? How does it identify you to give you the correct session variables among the rest of the users using the app?
In sessions, that is
I'll tell you how
Anonymous
@BenjaminGruenbaum btw if you have a problem with your ajax script, make sure to change a.statu === 200 to a.status === 200 :)
17:47
PHP assigns your connection with an ID, and gives you that ID in a cookie
@bwoebi I'm not saying jQuery is useless. I'm saying it's overused.
@phpNoOBఠ_ఠ I just wrote this right now in chat... you know that right?
m59
m59
Yes...
If that cookie with the ID gets stolen, PHP will identify the attacker as the victim.
@MadaraUchiha s/sessions/cookies ;)
@BenjaminGruenbaum yeah, the famous 2 + 2 with jquery :-P
17:48
@PeeHaa埽 No, I meant sessions.
> How does it identify you to give you the correct session variables among the rest of the users using the app?
in sessions?
PHP knows what session to assign to you based on sessions? Yo dawg :)
Bleh, I can't delete it
whatever
m59
m59
Well, I must be wrong, but I still haven't actually heard a reason why :(
wb
wb @hakre
m59
m59
17:50
if I don't know why I'm wrong, I can't figure out the how to be right part..
so what's cooking?
@m59 The only solution for secure authentication in server-client communication is HTTPS/SSL.
@hakre Cookies!
Anonymous
@BenjaminGruenbaum sure! But AJAX may be on the dying edge though. I am thinking about learning some Socket io/Node.js/XMPP
Oh yeah. Beware the cookies, they are also used by the NSA to track you.
Fun fact: NSA does not honor the Do-Not-Track header
@hakre WHAAT!?!?
throws pc out of the window
m59
m59
17:52
the persistent login thing is secure enough and being used anyway, I just don't see the need to check that and then start a session which is just another vulnerability...
@phpNoOBఠ_ఠ You clearly have no understanding on how any of those work. AJAX is just an HTTP request that doesn't require a page refresh, it's just like a normal page entry only you invoke it with code, read on how the HTTP protocol works. Socket.io is a library that uses technologies like WebSockets (and AJAX if it needs to) to do duplex communication. Node.JS is server side JavaScript and XMPP is just a messaging protocol.
@m59 A session === cookie on the client side
It's the same thing
@m59 How do you do persistent login? Can you describe your process?
PLB
PLB
@MadaraUchiha Well there's also one more way. When user logs in with different ip than used to, you can send notification and ask for verification. But it's very very very uncomfortable.
AJAX isn't dying, or getting replaced, its area of responsibility is completely different form that of web sockets, or protocols like XMPP
17:54
Ehh, what are you so concerned about?
m59
m59
kinda complicated, but basically, user enters credentials first time, generate two long random numbers and store them in the db with the user name and in the cookie. User comes back to the site - get user/number1 from the cookie, pull that record from the db, now compare number2 from that record with number2 from the cookie
@PLB Is that so?
m59
m59
Well, more complicated than that...
there are some checks to see if someone is trying to brute force it
Fun fact: In 2013, you can change IPs by walking down the street
@m95 So you are trying to roll your own here? Why not take a look into the literature first?
m59
m59
17:56
meaning the user/number1 won't even be right
really!!?!?
This is exactly described in the article just linked to me on the right way to do it.
Goodness gracious.
And the article does not explain it well enough for you and you still have questions or concernes or what?
Anonymous
@BenjaminGruenbaum I beg to differ. I am sure if you were trying to create a chat website, you would prefer to use Node.js/websocket.io/XMPP instead of using AJAX. that is what I meant, nothing more/less
m59
m59
I implemented it just fine and am quite certain the cookie is secure...
@BenjaminGruenbaum Yes, if it doesn't have the hakre taste it can't be good :)
17:58
@phpNoOBఠ_ఠ No, what you said is that ajax is on the dying edge. Which shows clear lack of understanding of how the protocol works.
m59
m59
I'm just asking why in the world I should use my secure cookie to set a session variable (another vulnerability) rather than just checking my cookie/db every page load and setting $auth = true. The only drawback I see there is performance.
but everyone is saying it's not secure.
I can't see that. That says to me that persistent login is totally un-secure no matter what you do.
I'm so confused.

« first day (966 days earlier)      last day (4207 days later) »