« first day (544 days earlier)      last day (4404 days later) » 

12:05 AM
good night
 
12:33 AM
I know I can use $_GET['test'] and get false if in my url ?test=false, but how do can I remove the test= and use get to pull ?false from my url?
 
1:25 AM
@Howdy_McGee Better question is why would you want to?
To answer, though: isset($_GET['false']) or array_key_exists('false', $_GET) should both work
Actually, isset won't work. Use array_key_exists.
 
Hi, anyone got some experience with Zend FW and Doctrine?
 
@Howdy_McGee isset does work, actually. I've been coding for too long.
@webarto I wish I had experience with Doctrine. I had trouble setting it up and never got it working.
 
I'm gonna kill it with fire :D
after hour and a half, still "Class not found"
 
2:03 AM
@rdlowrey I'm trying to pin down why I like Artax so much, and honestly I think it's because of the automatic injection. It allows me to set up my class however I need them and it copes with it just fine.
 
2:33 AM
@LeviMorrison Agree. Also, I've seen it in facebook pictures. Have you ever noticed the &theater when looking at a picture? That's it.
 
I don't really have any projects assigned to me at the moment so I got bored and made this themis.myrayhawk.com/traceroute.php
 
2:52 AM
Nevermind. That points to my work computer (and our network). Which get's a whopping 34Kb upload...
 
@stevether 404
 
You chokin my net bro
Granted, it's not your fault, just my idiocy
Okay, it's 8pm, that's 10 hours for me. I'm going home.
 
3:18 AM
hi..
 
@Katherine hi
 
@webarto Easy as hell =D
 
4:10 AM
@Phelios how can I remove the square brackets for a result of sql query
?
 
can you elaborate your question a little bit more?
 
I'm putting the reult of my sql query into any array but when I display it square brackets are showing up for the resutl
@Phelios
 
you mean, your actual data might contain some square brackets []?
you can remove it using string replace php.net/manual/en/function.str-replace.php
 
@Phelios sorry the actual data contained [] that was teh problem fixed it now
 
great
 
4:18 AM
@phelios I have some doubt regarding the formatting of the text
 
you don't have to put my name in every sentence you write you know :)
 
I will need to display the first item of the array at a certain place and so on for the rest of the items
I'm just a beginner
the array is the result of the database
query
 
and your doubt is?
 
I will need to do all this dynamically how can get the position of an element in an array?
 
by the way, what database are you using?
 
4:25 AM
mysql
 
actually I just want to know how you loop through the data
because normally I do something like while(mysql_fetch_object($result))
 
this is how I'm looping through the array
foreach ($get_info as $field)
{

echo "<h1>$field</h1><br>";

}
I'm doing the same
 
what is $get_info?
if you want to know the index using foreach
you can do this
 
$get_info is the result
of the query
 
mysql_* is softly deprecated news.php.net/php.internals/53799
 
4:28 AM
foreach ($get_info as $key => $field)
{

echo "<h1>$field</h1><br>";

}
 
here $key is the index right?
 
the $key will tell you the position
yes
 
but can I get the value using the $key?
 
@Paul, we are slowly migrating :)
Dinesh, how do you get your $get_info?
 
$get_info = mysql_fetch_row($result)
 
4:33 AM
ok, as Paul has mentioned, mysql_* is softly deprecated
you should consider using mysqli_* or probably PDO
 
Yes, that is the way.
 
any way, fetch_row will fetch one row at a time
it doesn't fetch everything into $get_info
 
so, the answer is no, you can't get the value using the $key
 
then how can I get the value?
 
4:35 AM
I'm sorry man, I think I've confused you, and myself :)
 
@DineshVenkata Do you have a code snippet?
 
yea
@paul
 
Its pretty hard for Phelios only being able to guess at your code.
 
$num_rows = mysql_num_rows($result);


while ($get_info = mysql_fetch_row($result)){

foreach ($get_info as $key => $field)
{
{
echo "<h1>$field</h1><br>";
}
}
 
yes, that will be great
 
4:38 AM
was the query a select statement?
 
yes @paul actually I'm developing a quiz app the table has 5 columns one for question and the remaining for options
 
@DineshVenkata click edit, then set fixed font on your code above. It will make it print nicely.
 
sure @paul thank u
I need to display the options beside the radio buttons
 
echo 'Num rows: ' . $num_rows; before the while loop (maybe you aren't getting any data).
 
4:46 AM
so, your query should return 5 columns, and each row is one question with its options
right?
 
yes @Phelios
 
if your question is the first row, then you can get your question by $get_info[0]
 
then you will loop through the remaining 4
I don't think you need the foreach though
just use the normal for loop for($i = 1; $i < count($get_info); $i++)
so you will print your first column first (the question)
then you run the loop
 
yea got it
thank u
:)
but I think I should use if else to display the options at different positions
 
4:54 AM
yeah right, you don't have to use the loop in that case
 
yea
echo "<h2><strong><b>$get_info[1]</b></strong>?</h2>"; this statement is not displaying anything
@Phelios @Paul
@MaheshDesai
 
5:18 AM
@DineshVenkata RTFM. please.
 
RTFM?
 
Read the freaking manual.
 
@DineshVenkata var_dump($get_info); // See what you are dealing with, and then deal with it appropriately.
 
@Paul Hey!
how you have been ?
 
Hi @OmeidHerat long time no see. I've been good thanks, and you?
 
5:26 AM
good thanks.
was busy with some project. I am kind of getting pulled back to electronics. :)
what have you been up to ?
 
I've just been working on my framework. Its pretty much finished.
(Not that it is a framework, it is very much a library.)
 
Oh, sounds interesting.
have you put it on some public repo yet ?
 
yep, its on github. github.com/Evoke-PHP/Evoke-PHP
My next step is creating an example site.
 
@Paul O.o
I wonder why you have a CSS folder ?
and your website is down. :D
 
Pls suggest any video conferencing providers (paid / free) for my telemedicine project..
 
5:35 AM
That is a good point, I can proabably clear out the css to make it more of a library. Yes, that and implementing the website, lol. You picked up on those quickly.
 
@Paul haha, I am a bit chessy. but I know that you like positive criticism. :D
 
Yes, that is always good. Next step the website, even if it is basic at first.
 
good stuff.
 
5:54 AM
Hello folks
just want to ask a small question...
Can i use Lighttpd instead of Apache, on windows
I want to handle a lot of users, say around 10,000 at a time, in my php chat application
For this, i consider Lighttpd as the best, than traditional Apache server
 
@dskanth are you using video chat?
 
@SHANib No, i am building a normal chat app, where users can send textual messages between them, but there are a lot of users (10k)
I am planning to use Ajax long polling for my chat app, and hence Apache is not a right choice, as the user connections need to be open for a long time.
 
@dskanth Why don''t you try Node.js and websockets?
 
I also heard about Nods.js and websockets, but websockets are not supported in all browsers
and Nods.js installation is somewhat complex
Note that i need to install on a windows platform..
 
@dskanth It's as easy on windows as it is on linux.
@dskanth There are libraries that provide solutions for browsers that don't supprt websockets.
 
6:03 AM
Will Nods.js support long polling, and also lot of user requests at a time ?
 
@dskanth It will support push notifications.
 
@Oleg Good to know this...
 
@dskanth Besides, it's non-blocking.
And much, much faster than PHP.
 
Is it recommended to use short polling (say, user requesting every 4 seconds) or long polling ?
 
@dskanth You can do both.
 
6:05 AM
@Oleg Which is faster, Node.js or websockets ?
which one do you recommend
 
@oleg I need to display textual data for radio buttons from database how can I do that?
 
@dskanth Old browsers can either implement polling or use, perhaps, a workaround with Flash (never tried that).
@dskanth Websockets is a technology. Node.js is a software. You cannot say that one can be faster than the other. They are completely different things. But they can work together.
 
@dskanth that is not strictly true.
 
@Oleg ok, i will try to use Node.js, and also short and long polling
 
just go for socket.io and you are good as gold even with ie5+ !!!!!!
 
6:07 AM
@OmeidHerat Can i install socket.io on windows platform ?
 
@dskanth Node.js + socket.io = win
 
hi guys
Good Morning
 
@dskanth I suppose yes. but I personally haven't tried.
and also, if you are going to do serious web development with opensource technologies move to *nix or live with limitations.
 
@Oleg can you suggest me how can i implement a video conferencing in my php website?
 
@SHANib Sorry, I'm not competent enough to provide any valuable advice on that topic.
 
6:09 AM
@SHANib You can try tokbox ( tokbox.com )
 
@dskanth hav u tried it? security matters alot as some sensitive data is passing..
 
@SHANib Security is included in tokbox, using sessions and subscriptions
Those who subscribe to the session are only allowed to view the video conference
 
Any one help me
i have a one link if i click the that link it will open the pop up
 
@SHANib if it's important then why you are coding for it ? get a developer.
 
@OmeidHerat Maybe he IS a developer? :)
 
6:15 AM
someone asking about video chat on PHP room isn't a developer.
Please.
 
@OmeidHerat @Oleg @dskanth @SHANib help me
 
@857628 We need more information. What is exactly your issue?
@OmeidHerat Oh... I would have asked...
 
@857628 I am not going to help. seriously not. if you don't know how to ask a question.
@Oleg then you need to study more about web development :P
 
@OmeidHerat Mind giving me a hint where to start?
 
@Oleg i have a href link if i click that open the pop up just like html-form-guide.com/contact-form/…
 
6:21 AM
@Oleg depends on what you want to study.
@857628 what makes you think you should ask that question in PHP ?
 
woah, i just wrote an answer, and got upvoted within a second, but my answer was quite detailed. No-one could have read it.
 
@OmeidHerat "web development" :)
@857628 I'm going to take a look, give me a sec
 
@Oleg ok
 
@Oleg there is lots of topics to study on web development but a good one for basics should starts with What is server side and what is client side, regardless of the topic.
 
@857628 Okay, so you want some login form appear on top of your page when the user clicks some link?
 
6:25 AM
yes @Oleg
 
@OmeidHerat Yay, server side and client side? Exciting!
 
so no matter what topic, if you know the basics, you should understand that asking about Video Chat in PHP room doesn't make sense. :)
 
@857628 So, I got the idea but... what is exactly the problem?
 
8 mins ago, by Oleg
@OmeidHerat Oh... I would have asked...
 
@857628 You don't know how to do it? Or you have done something and it doesn't work? Or...
 
i am getting but in between asking other page if i click the button on that page that time is pop up opening @Oleg
 
Wut :|
 
I didn't understand either...
@857628 Do you have some code to show?
@OmeidHerat Do you imply that a video chat doesn't need a server-side implementation? Especially if it's a conference?
 
@Oleg no. but I do imply that the server-side implementation shouldn't be written in a hypertext preprocessor.
but if you are saying that something should server the pages ? Oh. that is what the HTTP server does and you really don't need any scripting language for that.
 
@Oleg here is the code pastebin.com/V5M594Gg
 
6:36 AM
@OmeidHerat Oh... and all the transfer, synchronization, streaming, storage, backups, file and user handling, sessions, and the rest will be handled solely by an HTTP server?
 
Ram
Hi All
 
@Oleg are you suggesting that you want to transfer video with PHP ?
 
@OmeidHerat The choice of language is irrelevant. He wants to do it in PHP for some reason - fine. In Python - fine too. In Node.js - interesting, okay... It is irrelevant. There are advantages and disadvantages in all the languages.
3
 
@Oleg and all the other parts of irreverent to a video chat.
 
Ram
how to make poup link to get user details on website.
 
6:39 AM
@Ram Have you learnt AJAX yet like I told you?
 
@Oleg No. choice of language isn't irrelevant. a hypertext preprocessor is designed for what it's name suggests and if you use it for anything else
 
Ram
@Paul I am trying to do that on JS
 
@857628 Does your "require_once" actually work?
 
@paul I'm trying to fetch my query's result in an array but it doesn't give me any result
$result_array = array();
while($row = mysql_fetch_assoc($result))
{
$result_array[] = $row;
}
echo $result_array[1];
 
@Ram go to the JS room then.
 
Ram
6:40 AM
ok
letme do that
 
@857628 Do you get any errors on your page?
 
@DineshVenkata don't learn mysql_* functions. learn pdo or mysqli.
 
yea sure but I'm just starting off @OmeidHerat
 
@DineshVenkata Your SQL statement is either wrong or you don't have data in your database.
 
can u tell me the mysqli alternative of the same
 
6:42 AM
@OmeidHerat Oh damn... you're right! I've been using it to build APIs and connect to databases... Damn, what a fool I am.
 
@paul but when I use this while ($get_info = mysql_fetch_row($result)){


echo "<div><h1>$get_info[1]</h1></div>";




}
I get the result
 
@DineshVenkata the mysqli_* functions are being deprecated, and they don't have much of thing to learn from them anyways. so start with PDO or mysqli.
 
okay @OmeidHerat
this is the error @paul Undefined offset: 1
when I fetch the array
 
so, get_info isn't what you are expecting. var_dump($get_info); See what it is. Then fix it appropriately.
 
@Oleg I really can't distinguish between a troll and someone who really wants to make a Video Chat Server with PHP. so yeah. what ever.
 
6:46 AM
this is the error when I use var_dump($get_info); bool(false)
@paul
 
the fact that HTTP is the worst protocol out there for streaming should make it clear that why it's wrong to write a Video/Audio server with PHP all the why from the bottom.
 
@DineshVenkata so, your query failed. Why not switch to PDO now seeing as your query wasn't even successful?
 
@Oleg no error but when i click on the link it will open another window in that window have one button i click on that button that time pop up will open
i need directly
 
how do i do that @paul?
 
@857628 Try return false; in the end of your href?
 
6:52 AM
@tereško Did you have a good tutorial for PDO you were mentioning the other day?
 
thanks, read that and try some basic things with it @DineshVenkata
 
@paul actually I'm thinking of switching to mysqli
 
well , PDO will let you work with other databases too
sqlite might be important for you
 
yes, if you are wanting mysqli you should have good reasons for it.
you would have to be wanting to do some very serious stuff.
 
6:57 AM
@Oleg :Actually we are working on one website which is searching online software institutes.Once user click on search button all the available institutes will show on table with brief introduction.If user wants to know more details on particular institute user has to cllick on that institute.When he click on that institute one popup window has to come with contact details.
 
@paul $stmt = $db->query('SELECT * FROM tablname');
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
this gives me the error Fatal error: Call to a member function query() on a non-object
 
the error message is telling you the answer
 

« first day (544 days earlier)      last day (4404 days later) »