« first day (1011 days earlier)      last day (4163 days later) » 

00:07
(I can)
$apiQuery = http_build_query([
        'filter'   => '!wQ0g-ul-W8LDT0w',
        'key'      => 'pMxerkFG8E257Xblt5BUHA((',
        'order'    => 'desc',
        'pagesize' => 100,
        'site'     => 'stackoverflow',
        'sort'     => 'creation',
        'tagged'   => 'php',
        'page'     => 1,
    ]
);

$apiRequest = 'https://api.stackexchange.com/2.1/search/advanced?' . $apiQuery;

$apiData = json_decode(file_get_contents('compress.zlib://' . $apiRequest, false,
    stream_context_create([
I'm getting 400 error, was working fine all this time, nothing in that block of code has been changed, so want to make sure my server IP was not banned
I got 100 results
On PHP 5.5.0 on Debian Linux.
Warning: file_get_contents(): HTTP request failed! HTTP/1.1 400 Bad Request
in /public_html/cv-pls.com/dev/web/backlog.php on line 24

Warning: file_get_contents(compress.zlib://https://api.stackexchange.com/2.1/search/advanced?filter=%21wQ0g-ul-W8LDT0w&key=pMxerkFG8E257Xblt5BUHA%28%28&order=desc&pagesize=100&site=stackoverflow&sort=creation&tagged=php&page=1): failed to open stream: operation failed in /public_html/cv-pls.com/dev/web/backlog.php on line 24

on PHP 5.5.0 as well on Linux
Well, I copy and pasted it.
Not sure what's going on.
Maybe my gzip has broken? I'll try without using the compress.zlib://
Nope

Warning: file_get_contents(https://api.stackexchange.com/2.1/search/advanced?filter=%21wQ0g-ul-W8LDT0w&key=pMxerkFG8E257Xblt5BUHA%28%28&order=desc&pagesize=100&site=stackoverflow&sort=creation&tagged=php&page=1): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /public_html/cv-pls.com/dev/web/backlog.php on line 24
Only other thing is my host which IS crappy has blocked my outgoing.
00:16
What does $http_response_header say? @crypticツ
user895378
@crypticツ I feel like a broken record saying this, but you could use my library. It automatically requests and decodes gzipped entity bodies.
soarray(11) {
  [0]=>
  string(24) "HTTP/1.1 400 Bad Request"
  [1]=>
  string(13) "Server: nginx"
  [2]=>
  string(35) "Date: Tue, 23 Jul 2013 00:18:48 GMT"
  [3]=>
  string(45) "Content-Type: application/json; charset=utf-8"
  [4]=>
  string(17) "Connection: close"
  [5]=>
  string(22) "Cache-Control: private"
  [6]=>
  string(22) "Content-Encoding: gzip"
  [7]=>
  string(30) "Access-Control-Allow-Origin: *"
  [8]=>
  string(39) "Access-Control-Allow-Methods: GET, POST"
  [9]=>
  string(39) "Access-Control-Allow-Credentials: false"
user895378
file_get_contents is as non-performant as it gets if you're retrieving http resources ...
@rdlowrey I mean this was working fine all this time. I am suspecting my host is being a dick
Yeah it looks like I am going to have to actually take time to setup my VPS this week. =o\
user895378
And how hacky is it? Really hacky. Because a good library looks like this:
user895378
00:26
$client = new Client;
$response = $client->request('http://site.com');
user895378
Not the god-awful php streams method.
user895378
This is not me calling you out, but if people actually understood HTTP they would not tolerate the awfulness of file_get_contents or curl_* ... they're both really, really terrible.
user895378
Or:
user895378
$request = (new Request)->setUri($uri)->setHeader(...)->setMethod('POST');
user895378
Just food for thought.
user895378
00:28
For a language that's built around making HTTP a first class citizen, PHP has some really poor HTTP abstractions.
user895378
And I say that as someone who really likes PHP :)
@rdlowrey No, I agree. I was planning on making a separate file to handle the HTTP requests, but a little later down the road.
user895378
@crypticツ You're doing a nice job on the backlog UI!
user895378
Looks good.
thanks, but looks like it's going to have to be put on hold as I install a webserver on my VPS.
user895378
00:34
what's the OS on your vps?
user895378
Because if it's fedora/centos/rhel you can use yum to install everything you need for a nice php install really easily using the remi repo.
I'd love to see some cv-tools using Artrax. The more people testing using it the better!
@rdlowrey Ubuntu 12.04, I can get Debian 6.x both which have apt
user895378
I feel like I'm the only person besides @hakre who uses the fedora/rhel/centos OS family ...
user895378
@LeviMorrison Well every time I see people using file_get_contents or curl_* I because they're so inferior.
00:43
@rdlowrey I use RHEL for everything BUT web at work.
We use vanilla Debian for our web servers.
user895378
So I've now officially succeeded running multiple protocols on the same port without using an HTTP upgrade mechanism. And @LeviMorrison, you just got recruited to do a quick telnet/websocket chat session. (super-ping apologies)
No worries.
telnet: Unable to connect to remote host: Connection refused
user895378
@LeviMorrison I know, I started the wrong demo server :)
user895378
It's up now. force refresh on 174.107.156.0
user895378
$ telnet 174.107.156.0 80

line-feed
user895378
00:51
You'll see that the messages are shared between the telnet chat and the websocket application running on the same port in the browser.
user895378
01:02
@LeviMorrison Thanks for sending me your bits and bytes for testing. I'm stopping the server momentarily.
:) You are welcome to ask again.
user895378
I actually think the functionality is more or less ready for a v0.1.0-alpha but I need to spend a week or two getting a lot more test coverage.
user895378
@Baba I just killed ModUpgrade in favor of the new ModProtocol which is much, much better in no small measure because of your suggestions. It abstracts out all the details of running multiple non-HTTP protocol servers on the same port as the HTTP server with a simple interface similar to the websocket endpoints. There's an (awesome) example at examples/protocol_mod.php demonstrating the functionality. Just pull down the latest repo changes to play with it.
01:37
@rdlowrey Fedora or CentOS?
user895378
@crypticツ for a server or a desktop OS?
server
user895378
CentOS
user895378
If you need help getting your php environment up and running after you finish the install lemme know.
I'm going to cheat and install CPanel =oP
ain't nobody got time setting up
user895378
01:39
hehe, the sad thing is if you put me in front of CPanel I wouldn't have a clue what to do.
installed =oD
02:05
CPANEL?
Are you nuts?
lol
02:26
@LeviMorrison I have no clue how to do things on CentOS and I got a half dozen sites I need transferred over and setup. I just don't have time to be digging around in config files and running commands to initially set it all up. Once it's all setup, I will be doing it manually.
@all if you have a minute, can you try throwing some queries at this and see if you can find anything broken/missing? I'm aware it doesn't know about any pre-defined vars, but it should work for all classes/class members/functions/ini settings
8
It's very rigid logic at the moment, I hope to add some fuzzy searching at some point but I don't need it for the linkifier so don't hold your breath
The only param it accepts is q, it should be fairly forgiving and work with (I think) any token that PHP.net accepts, plus a few more
Also please don't look at my horrifying source code. This is just a proof of concept for the logic, it won't stay like that :-P
wow that's cool!
@DaveRandom so it's basically doing the same thing as the php.net search form?
More or less
Did you scrape the docs and save it all in a db?
02:33
@Ahmad I build a DB index from the docbook sources
So kind of, but it's a little but more precise and targeted than just crawling the site
Ah cool
@crypticツ The main difference is that the quickjumps on PHP.net don't know about constants, ini settings etc (things without a whole doc page) and also it can cope with ClassName::$property - i.e. PHP syntax instead of permalink IDs
Anywho, I really should be in bed like 3 hrs ago
So I bid you adieu, I shall return on the morrow
@DaveRandom sweet... method signature (where appropriate) would be a cool add as well as treating arraysearch the same as array_search
@DaveRandom so it's basically doing the same thing as the php.net search form? So whatever it returns it should return as well?
@Orangepill on the list of things to do, but I've made it for a specific purpose and I don't need anything like that for what I'm going to use it for so it might be a while. It's primary purpose is to be a back-end for the new improved linkifier plugin
Oooh I forgot about language constructs
fail
@rdlowrey That's beautiful code, I wonder what client that is ;-)
Right, I really need to go to bed, I'll catch y'all later
user895378
@Jack lol. Well at a certain point it just gets annoying seeing people struggle with the same things over and over. I just want to shake them and be like, "OMG SRSLY STOP."
user895378
@DaveRandom hey, real quick.
02:41
Damn you people! :-P
user895378
What kind of queries are you looking for on that starred message?
user895378
Oh nevermind I guess a little reading answers that question.
user895378
@DaveRandom Have a good night, then :)
@rdlowrey PHP manual references - functions, methods, constants, ini settings, classes, extensions
@rdlowrey Agreed; I typically muffle curl_ somewhere inside a pretty object structure ;-)
02:42
It doesn't yet know about predefined vars (like $_POST etc) and @crypticツ has just pointed out that it doesn't know about language constructs
But it does do stuff like phpdoc.daverandom.com/?q=error_reporting vs phpdoc.daverandom.com/?q=error_reporting() (so it takes syntax into account)
phpdoc.daverandom.com/?q=__construct ? not sure if that should be.
ffs
@crypticツ Hmm yeh, that should work as well
Right, seriously going to bed
nite @all
三百 :)
02:52
572
03:02
that was a short game with no clear winner :)
CSS FTW 1K \m/
@Mr.Alien Congrats
@Orangepill Thank you :D
03:32
any doctrine 1 ninja's here?
2
Q: Zend + Doctrine 1 suddenly tries to store an incorrect DATETIME format in MySQL

NickI have an app with Doctrine 1 and I generate update_datetime fields for objects via new Zend_Date->getIso(). It worked just fine for years, but now I got a new notebook and Doctrine tries to insert a DATETIME fields as a string "2013-07-12T03:00:00+07:00" instead of normal MySQL datetime format "...

04:08
Does anyone here have 5 minutes of their time to help me on an issue regarding sessions.
@TheGuyWhoCouldn'tTalkToTheGirl sure, but I don't know if you would talk to me =oP
@crypticツ I kinda figured it out already, but thanks!
@crypticツ I keep getting: Notice: Undefined index
@TheGuyWhoCouldn'tTalkToTheGirl show or link to the code
@crypticツ Working on it, but what the does error mean?
Never mind, I figured it out.
04:24
@TheGuyWhoCouldn'tTalkToTheGirl it means you are trying to use an index in an array that does not exist. Use isset() or array_key_exists()
@crypticツ Yeah, I apparently mistyped the code :D
04:39
@theGuy..... you are talking to a girl :P
@Mr alien why you are flagging my ans for cw
@TheGuyWhoCouldn'tTalkToTheGirl Oh yes, you are rajesh koothrappali
@Mr.Alien I don't even know who that is.
I think it's far too complex to a simple task. IMO :/ — felipsmartins 1 min ago
lolzzz.
04:42
@TheGuyWhoCouldn'tTalkToTheGirl Ya than you should find him on the google
Ohh you are right one ....but may I ask why ? I mean does any girl bite or beat you ?:P
@yogesh yup it is ⊙_○
@NullPoiиteя I am sorry, what?
@NullPoiиteя too complex for using ajax?
For using keyboard :)
I think there's no reason for using AJAX because of this page will be redirected to another page (login.php) — ABFORCE 3 mins ago
04:48
@theGuy why you cant talk to girls
They are brainstorming me. :(
@YogeshSuthar Check this out bitch check this out
@Mr.Alien dekha mene.
morning ko pahle yahi dekha
@NullPoiиteя Its a sad story man, I don't know if you would want to hear it.
@YogeshSuthar lol, actually they updated late
user895378
04:50
user895378
Seriously ... WTF is the deal with the massive SO chat memory leak? How is this not fixed yet? Every day it gobbles up hundreds of MB of my memory.
@Mr.Alien Yeah around 9 AM they are updating
@Mr.Alien congrates bro.
@yog redirect to other page and on that page rediret to login page would be better
@Nileshpatel hey thanks :)
@YogeshSuthar nah, they update at 00:00 UTC but sometimes they update late, it's a cron, sometimes it updates 2-3 days later
04:52
@rdlowrey se doesn't care about chat ...●_⊙
@NullPoiиteя Yeah, its tutorial for OP. That's why I haven't included that. :)
0
A: How to connect to XMPP server using PHP

Nathan SriviYou need to create database using http://localhost/phpmyadmin and then you can connect via php Syntax mysql_connect(server,user,pwd,newlink,clientflag) Example <?php $con = mysql_connect("localhost","mysql_user","mysql_pwd"); if (!$con) { die('Could not connect: ' . ...

lolzz what an answer for XMPP server connection.
Good morning.
@Rafee mornin
How are you guys.
05:03
am fyn ya, hwz u
I have some sort of weird bug in which every place where I have an <a> tag, the word display its href after it. So if my code is: <a href="index.php">Index</a> the result is printed out as Index (index.php)
I am doing good..
Anyone ever had a problem like that?
Is XMPP is bundle like XAMPP or somethign else.
sup
sup
hi guys i have a doubt
lets say i have a html page which sends multiple table values say
example.com/index.html?id=1&name=name&id=2&name=name2&id=3&name=name3
how can i segregate the values in the php file to insert 3 rows in the table ?
05:04
@Rafee may be just php and mysql
@TheGuyWhoCouldn'tTalkToTheGirl what did you wrote in you php code.
is that comming dynamically.
I don't know, the problem is coming up in random pages.
@Mr.Alien only php and mysql how about Web Server.
@TheGuyWhoCouldn'tTalkToTheGirl i believe theres something wrong with your code
for print a
check the logic.
@suresh Hello
@Mr.Alien : @YogeshSuthar commented "XMPP is server just like Apache"
05:07
Maybe it has something to do with htaccess and url rewriting.
Ham confoosh hogaye..
no way.
@Rafee XMPP server is used for multimedia content. It's totally different than apache.
@TheGuyWhoCouldn'tTalkToTheGirl Can you just learn your ouput code
@YogeshSuthar any application usage.. like examples
@Rafee May be you are using Whatsapp, Facebook chat, etc. They are using it
@Rafee Check it out xmpp.org/xmpp-software/servers
@Rafee What do you mean by "learn your output?"
05:11
I mean to say.. can you check your code..
Yes, that is what I am doing.
the code where its prints anchor a elements.
okay cool.
Is there any framework you are using..
or the clean php.
Clean PHP
Well never mind
JQuery+PHP+HTML
can you show little code..
@Rafee they must have deprecated apache :p
05:13
@Mr.Alien No boss its totally different.
its like IRC client stuff..
for chatting as said by Yogesh..
@Rafee There is so much code and I don't know where the problem orginates.
@Mr.Alien You are noob. :)
@TheGuyWhoCouldn'tTalkToTheGirl Now the Real Coder and Tester Works Starts HERE..
go through the code or function where you wrote that stuff.
@Rafee wad do you think? this -> @YogeshSuthar repwhore knew it? he google it
I dont know.
05:20
Yes, he googled it :p
HYaha...
he called me and he told dat he googled
@Mr.Alien I knew it from when the whatsapp created.
I think he knew it..
05:21
@Mr.Alien Yeah I googled it , but 6-7 months before not today.
wow!..
thats cool man.. @YogeshSuthar have you tried that stuff..
for creating chatting app.
Hey how your project going on for LinkedIn.
@Mr.Alien All knows who is repwhore. ;)
@YogeshSuthar rofl, :p
@Rafee I am thinking of creating it, but not having time. :(
What you guys where discussing on that stuff seriously..
05:24
@Rafee Not yet started linkedin.
making a hard contribution with @Mr.Alien
Oh!. okay..
Hi :)
First time here :)
@gr4devel hi :)
How can I concatenate results of these two queries in MySQL. First query : SELECT name from movie_names WHERE name LIKE "bla%" LIMIT 3 Second query : SELECT name from song_names WHERE name LIKE "bla%" LIMIT 3
@silverflash union
05:28
@YogeshSuthar +1 :)
@gr4devel Welcome to SO PHP Chat.
@YogeshSuthar I am unable to do it. Can yo help by providing query ?
@Rafee thank you very much I'm honored to be there :)
@silverflash query1 union query2
@gr4devel Thanks. :)
SELECT name from movie_names WHERE name LIKE "bla%" LIMIT 3 UNION SELECT name from song_names WHERE name LIKE "bla%" LIMIT 3
@silverflash :D
a quick coffee and I'm back with my first question :)
05:30
take your time..
Happy National Vanilla Ice Cream Day
9
@Gordon It should be International. :) Everyone loves Ice Cream.
@YogeshSuthar make it a thing ;)
@YogeshSuthar @gr4devel I tried this query. It is giving 3 results. It should give 6 results, 3 from both tables. :(
05:33
bounce
@silverflash Try union all
@YogeshSuthar That is also Not working :(
@Gordon HNVICD :p I got a cherry on the Ice Cream too
here I am :)
wow so quick.
05:36
@silverflash ok let me check the query again
@Rafee XD
@gr4devel Okay. Thanks :)
@silverflash is it possible that some movies_name and song_names are the same?
@silverflash I mean there are some duplicated names?
@gr4devel no
@silverflash sorry can you write me down the result that you get and the expected one?
@all "thank you very much I'm honored to be HERE" XD
@sil meanwhile I
@silverflash meanwhile I ask my question
guys I'm actually trying to implement a type inference algorithm for PHP code
my final goal is to enable the detection of design patterns
and for some of these I need to know the possible types of variables in the source code
is there something already done from which I can get some ideas?
I have not done that.. stuff.
try google.
05:46
@gr4devel Here is the screenshot postimg.org/image/kncig4smd
@silverflash man there are duplicates! XD
@silverflash what you get from the UNION are all the results from the two queries without the duplicates
@gr4devel First one is the union query and next two are both queries separate
@silv
@silverflash i'm an idiot
@silverflash the problem is the LIMIT
@silverflash try to remove the limit from the two queries that form the first one
@maybe that's the problem
@gr4devel Sorry. I didn't mean it in wrong way. I was just telling.
@silverflash I'm the one who should be sorry ;)
@silverflash tell me if by removing the LIMIT you get what you need :)
05:52
@gr4devel If I will remove the limit, it will return all the results. I am dealing with quite a big database. I will return more than million results :(
@gr4devel No, its not working.
I tried the query without limit and now I have to press "Ctrl + C" a hundred times to stop it :P
@silverflash ok I'm thinking
@silverflash :) we will get this thing right don't worry :)
Yeehhh. :)
@silverflash ok maybe you shold remove the limit from the two queries and wrap them in a third one on which you apply the limit condition
try this
@Rafee +1000 :D
05:57
Okay. Let me try
SELECT * FROM (
SELECT name from movie_names WHERE name LIKE "bla%"
UNION ALL
SELECT name from song_names WHERE name LIKE "bla%"
) as result_set LIMIT 1000
@Rafee it will also give 3 result not 6. :)
I believe union will remove duplicate records
@Rafee I confirm that
@silverflash try that query and let me know.
05:59
hi,can someone help me.take a look my question stackoverflow.com/questions/17801535/…
@Rafee @gr4devel It is giving 6 results. But, all the 6 results are from first table only. :( I want 3 from first and 3 from other :(

« first day (1011 days earlier)      last day (4163 days later) »