« first day (669 days earlier)      last day (4505 days later) » 

00:03
Does having a rather large $_SESSION variable slow down site performance?
I agree that the answer is XSS should be filtered in the View of MVC. The info on templates is irrelevant to the question. A template is still a view and if you have untrusted data being sent to it (such as a page title) you'd filter that data in the view (regardless if it is a template). — Justin 2 hours ago
@ircmaxell Nice idea btw. I hate writing that boilerplate code. You then need to refactor and everything throws around. I dislike the magic methods, too. So actually I normally define each method for boilerplate first.
@daviesgeek Hmm.. Never had a problem with that... I normally have up to 5 stuffs stored in a $_SESSION. How many things do you have in yours?
00:08
@Troy :-) I have an array with about 60 values in it.
@daviesgeek weeew... I never went that faaar, I don't know dude.
@ircmaxell Are there any other languages that have decorators built into them?
I'll just make sure I unset it once I'm done with it...
@LeviMorrison No other dynamic language has the need for them, because they don't do strict typing checks
class FooDecorator extends Foo {
    protected $subject;
    public function __construct(Foo $foo) {
        $this->subject = $foo;
        foreach (get_object_vars($foo) as $n => $v) {
            $this->{$n} =& $foo->{$n};
        }
    }
}
00:12
@daviesgeek Yeah, try that and see if the performance is better.
00:26
hey guys Im back
@daviesgeek , we use tags to emote
Hi @user1065129!
hi @ShaquinTrifonoff. Is this ur name or I'm talking to somebody else
btw I got a class in an hour
:)
@user1065129 That's me.
@ShaquinTrifonoff cool story bro
00:29
@ShaquinTrifonoff , stop encouraging the children
@user1065129 @tereško Which story are you talking about??
@ShaquinTrifonoff nothing, i was just saying it bro
I love PHP community, because it is such a friendly environment
everyone likes each others and loves each others no matter what gender you are
@user1065129 I hate anyone whose chat id starts with user and is followed by a bunch of numbers.
:)
cmon bro, this is just a temporary nick name
@user1065129 I have answered multiple questions for @userXXXXXXX.
@user1065129 You could change it to Untitled User Account :-)
or Temporary Nickname.
00:36
@ShaquinTrifonoff I don't know how to change ur nick name on stackoverflow
is this even possible ?!
Yes, it is.
but how!?
Go to your profile and click Edit, then change the Display Name.
@user1065129 Lol, how do you think we got ours? XD
@Troy Did we change ours? I didn't.
00:37
how's my nick name look like now?
@ShaquinTrifonoff I changed mine multiple times.
Still the same.. we haven't resfreshed.
@Troy What did it used to be?
@ShaquinTrifonoff My real name.
Why am I still user102013
why i dont like syfony2 .. it the crap like this :
public function forward($controller, array $path = array(), array $query = array())
{
    return $this->container->get('http_kernel')->forward($controller, $path, $query);
}
00:39
jesus, plz help me
@user1065129 I dunno...
oh my christ lord jesus....
btw my religion is Jesus
@tereško I've never used a PHP framework. PHP is just enough for me.
@user1065129 Do we really need to know? :/
am just saying it bro
@user1065129 You're a bot, don't call me bro XD
00:41
@TemporaryNickName Your name is showing in Stack Overflow, just not Chat.
@user1065129
cool
@ShaquinTrifonoff cool story bro
@user1065129 What are you talking about?
ok this is getting ridiculous
@user1065129 - You've said 'cool story' twice, can you provide a link or something?
let's talk about stuffs that's related to PHP
cmon guys
00:43
@ShaquinTrifonoff He just wanna make a conversation.
Today I made another sale on envato.com and I got a five star rating from my buyer :D
or should I say, on codecanyon.net
@draconis hi!
@draconis Hola.
@user1065129 Wow, take it easy..
00:46
what
@Troy What did you sell?
<offtopic> Please suggest me a good post apocalyptic movie </offtopic>
@ShaquinTrifonoff A PHP script.
zombies are preferred
@draconis 2012
00:48
@ I'm working on the now.
@ShaquinTrifonoff Great :)
@Troy Thanks, added to my list.
Bookmark the website too if you really like these movies.
Guys, what makes a programmer cool, highly employable, expensive and awesome
i did. Yea i like post apocalyptic movies.
00:52
@user1065129 Very high-quality work.
@user1065129 attitude, knowledge, high quality work like @ShaquinTrifonoff said and coolness.
Lol, I saw it..
Interestingly enough I did recently write a blog post about what you need to know besides programming as a professional programmer...
I deleted my last chat because I thought it's too silly to ask such a question
@user1065129 I thought so too.
00:57
Obviously knowing how to write code and your attitude are pretty important pieces to the employable pie
ok, if you have 2 short listed candidates, one is super-handsome & cool but doesn't really know how to program and the other one is pretty good in programming but fat & nerdy
which one would u choose
@user1065129 Really?
@CharlesSprayberry Dude, I really like your article, I like how you keep it small but informative. A little, little bit rude :P But I really like it. Good job.
@Troy Thanks. Out of curiosity what aspects did you find rude?
@CharlesSprayberry Not too rude thought :P the "defend your position" section.
01:04
@Troy Ah, yea I guess I can see that. Well, still something I stand by. If you can't defend why you did something why did you do it? :)
@CharlesSprayberry Haa, Yeah, it's really great. Bookmarked this.
@Troy - Is it legal to use Microsoft's IE logo in the IE countdown?
@ShaquinTrifonoff Hm, let me check.
@user1065129 why is that even a question
sorry for asking silly questions
i'm just being a troll i guess
01:08
@ShaquinTrifonoff Yes, it's legal, I've seen it being used on a lot of websites.
@Troy It may be okay for reviews etc., but what about telling people to switch to Firefox?
(especially if I add a red X over-top of it)
01:10
@Troy just because people do something doesn't mean its legal
@Lusitanian I know what I'm talking about. Not any websites.
@Lusitanian , why haven't you put him in the ignore list already ?
@tereško J/W Why would you do that? If I'm of any disturbance for you here, you can just let me know..
@rdlowrey Did your day get any better?
user895378
@LeviMorrison Yes. I'm so close to making it work. The last two days have been brutal :)
user895378
01:14
I'm on a crazy OCD "make it work" kick
@rdlowrey I sympathize with those
user895378
I can't relax until I do.
Yup...
@Troy - By the way, I don't know how they can sell that. themes.tyler.tc/killie/blue
The source is there...
01:18
@ShaquinTrifonoff Lol, 40% of people who goes to Envato to buy doesn't know about web development. They just buy.
If someone wrote it and licenses it, then even if you can't steal it, doesn't mean you should.
If you walked into a store and saw an iPhone sitting there for the taking and you took it with the rationale that "it was there"...
@Lusitanian I know, I wasn't suggesting stealing that :)
just checkin
@ShaquinTrifonoff Neither was I.. XD
Do you guys know an easy way to get the structure of a database in PHPmyadmin without having to copy it manually?
01:20
But I would think providing a PNG would be better.
@AlexCastro how do you mean?
Table names/column names
I want to get the column names
and table names ofc
So run a dump
@ShaquinTrifonoff Envato is so popular that some people are afraid to steal their items (even for personal use)... but some of them do and post them on warez websites.
01:22
@AlexCastro , it has nothing to do with phpMyAdmin : dev.mysql.com/doc/refman/5.1/en/mysqldump.html
Thanks @tereško
to clarify, you probably can do that in phpmyadmin but there's no real point :P
@tereško :-)
01:38
@rdlowrey So if I call Mediator->push() with an event that doesn't yet exist, what happens?
It makes one and all is well?
02:08
@Troy - Here is a screenshot of what I have so far:
user895378
@LeviMorrison No ...
user895378
$mediator->push('someEvent', $someCallable)
@rdlowrey I just didn't see the methods to create an event.
user895378
What that line does is ...
user895378
Registers $someCallable as a listener for someEvent. If someEvent is ever broadcast, $someCallable will be invoked and passed the parameters (if any) that were broadcast along with someEvent
user895378
02:11
So an example would be ...
@ShaquinTrifonoff What about the other one?
@Troy What other one?
The one you linked to?
@ShaquinTrifonoff The first landing page you showed me. With all the stats, when you asked our advice on it and said it was yours.
@Troy I didn't say it was mine. I said I had modified the one from ie6countdown.com.
(And made it IE9 & 10 countdown instead of IE6 countdown)
@ShaquinTrifonoff :D Okay, sorry for mistaking. It's nice and simple. Can be better with some improvements but keep going :)
user895378
02:14
$mediator->push('someEvent', function($arg) {
    echo $arg;
});

$mediator->push('someEvent', function($arg) {
    echo 'I was also called';
});

class SomethingPluggable {
    private $mediator;
    public function __construct(Mediator $mediator) {
        $this->mediator = $mediator;
    }

    public function doSomething() {
        $this->mediator->notify('someEvent', 'someData');
    }
}

$pluggable = new SomethingPluggable($mediator);
$pluggable->doSomething();
user895378
@LeviMorrison
user895378
You don't "create" events. Any code with mediator access can broadcast any event at any time.
@Troy Can you think of some better wording for it?
user895378
You just call Mediator::notify($eventName, $arg1, $arg2, $argN)
@rdlowrey My real question was: Do I have to create an event before I can register listeners for it?
user895378
02:15
@LeviMorrison no.
user895378
The listener registration just says, "if this event is broadcast let me know"
@ShaquinTrifonoff I'm at work right now. I can't do other things, sorry.
Sometimes I love my job
@Troy That's fine.
user895378
@ircmaxell That's good :)
02:16
@rdlowrey I ask because it can help decrease errors if you have to declare one to exist first, at the expense of writing more code.
@ircmaxell - Sometimes I love my job - and other times you don't? :-)
Why did you choose the "don't create event before registering" approach?
I get to build a proof of concept for the CEO. And when I say CEO, I'm talking about the top of the top (CEO of a 300,000 person org). And I have almost complete control over it (all I got was a basic wireframe and concept, it's mine to run with)
@ircmaxell Can you give us super vague details on what it is about?
(don't want to ask you to break NDA or anything)
Well, think big data combined with analytics...
02:18
Another business solutions app.
I hope it's an interesting take on it :)
An app for multiple CEOs (main, and all business unit CEOs). What else would it be but a business solutions app...?
user895378
@LeviMorrison Well for me the most important thing is for listeners and event producers to be completely decoupled. The actual event names are solely in the domain of your own application -- it's incumbent upon you to trigger them if you need them.
@rdlowrey I was just thinking about the cases where I typo'd the name of the event when registering a listener.
so at the beginig of the day, mysqli prepare statements sucks, coz they cant be nested like the easy and proclaimed-by-all insecure mysqli_query statement
It'd stop me in my tracks if I have to create/register the event first.
user895378
02:20
@LeviMorrison To me that's just something you have to verify in unit tests. For example, when you register a JS listener for a dom event you have no guarantee that that event will fire ... You just know which event you want to listen for and if it goes occurs your listener is triggered.
@blackbee Sounds like to me you are abusing prepared statements.
user895378
But you know what DOM events are available and you register listeners accordingly.
user895378
Same with events in PHP.
ya, how did you understand?
I'm not saying you are wrong or right, I was just curious why you chose the approach you did.
@blackbee Simply because you are trying to nest them.
user895378
02:22
Well, the mediator implementation I have (Notifier) gives you access to information about everything it does, so you could extend it or add listeners to check if certain events were ever fired.
Why do you want to register events?
@ircmaxell I didn't say I wanted to, but if I did want to it would only be to catch mistakes early.
i need to show the comments for each post. hence using the first set of prepare statemet to fetch the post(/status update) and then for each post i called another set of prepare statements to fetch the comments for the post. and how amazing. it dinot work. i sued the $stmt->store_result();
but it wud show me the posts, i cudnot get the comments, the usual error was cudnot execute that prepare statement
@LeviMorrison I would say for the most flexibility, you would want to register whatever was bound. And cascade the tree on call. But you could always implement a getRegisteredListeners() method which would tell you which events were bound...
and as the insert query for the mysqli prepare statement worked fine, i got a little bold and changed all the select queries to execute in mysqli prepared way, then all of them didinot work, except the ones with no nesting.......... and my whole day is wasted from tomorrow, there is not a fucking correct article in google or stackoverflow...... and generally the tough php heroes cud not answer, they added me to ignore list
user895378
02:28
@LeviMorrison What @ircmaxell just suggested exists as Mediator::all($eventName) in the Notifier implementation.
@blackbee I'm very confused. You are trying to get an article and all its comments in one query?
user895378
@LeviMorrison I think a useful (and easily testable) approach is something like the following, because it makes it trivial to test that SomethingObservable::notify gets called with specific arguments in your code. This is how I avoid the "Typo in my event names" problem:
user895378
class SomethingObservable {
    private $mediator;
    private $state;

    public function __construct(Mediator $mediator) {
        $this->mediator = $mediator;
    }

    public function changeState($newState) {
        $this->state = $newState;
        $this->notify('stateChange');
    }

    protected function notify($eventName) {
        $this->mediator->notify('someEvent', $this);
    }

    public function getState() {
        return $this->state;
    }
}
@rdlowrey Oh, I just use PhpUnit's mocks for that :)
user895378
Or that.
user895378
02:33
But my point is that's an issue I'm happy to test and leave everything completely decoupled from knowledge of any listeners or events that are or are not registered.
user895378
Wow. That sentence is extraordinarily difficult to read. Sorry.
What do you call a function/class+method whose sole purpose is to set up a bunch of stuff?
I'm having a blank.
And this thing will call new.
user895378
I'd call it a factory if it sets up one thing ... maybe a Builder?
Basically I have a process that raises different kinds of events when things go wrong. Since I don't want to create all of the objects for every single possible thing that could happen in the system and then not use most of them, I'm having a function/class subscribe to the event and then that function/class will set up the next bit of the process and execute it.
user895378
protected function handlerBuilder() ??? I know it's not the Builder pattern, but it's all I can really come up with that makes sense in my head.
user895378
02:39
same with handlerGenerator
user895378
Not a "generator" in the usual sense, but it does generate things.
@LeviMorrison not at all, i wud like to share the pastebin code, but after what happened previous day, i am not going to.. i just tell u the sequence..
$usser_id=$_SESSION['user_id'];
$stmt=$dbc->prepare(select comment,comment_id from members where user_id=?);
$stmt->bind_param('i',$usser_id);
$stmt->execute();
$stmt->bind_result($comment,$comment_id);
$stmt->store_result(); //i placed this thing before the bind result line too;didnot work

while($stmt->fetch())
{
 echo ' '.$comment;
$stmt2=$dbc->prepare(select subcomnt,subcomnt_id from subcommnts where  cmmnt_id=?);
(see full text)
pls donot count comments and syntax errors like i instead of 'i'
@Troy I figured out why those Firefox images were not displaying. Firefox seems to automatically detect images that are Firefox banners, then assigns the class mjumydrjvbgswzaxkrku and hides them...
I fixed the problem by downloading the picture and linking to a local copy.
02:57
hi
is it possible to set a private property of a class from the outside
I don't think so.
@ShaquinTrifonoff Cool dude.
5
Q: Is there any way to set a private/protected static property using reflection classes?

dqhendricksI am trying to perform a backup/restore function for static properties of classes. I can get a list of all of the static properties and their values using the reflection objects getStaticProperties() method. This gets both private and public static properties and their values. The problem is I d...

user895378
@Petah Only if you have some sort of SomeClass::setSomePrivatePropertyValue($val) setter method
nope i dont :(
03:01
@ShaquinTrifonoff But I don't think it's a great idea to remove it it. Because if the person is using Firefox, they don't need to see these buttons anymore ;) It's a great idea from Mozilla.
@Troy I see.
The problem is it still displays the alt text...
@ShaquinTrifonoff Can't you remove it?
@Troy Of course. But then it wouldn't be indexed by search engines, and screen readers wouldn't be able to read it... But then again, they can't really upgrade to Firefox anyway.
@ShaquinTrifonoff Well then, go for a local copy :)
03:27
Hello Everyone, Got a silly question, but regardless i still need an answer. I use cakephp, and when i get a result from a query, its an associated array. My question is, Is it best/allowed for me to restructure this associated array to a smaller 2d array with only keys and values that i want ( i am trying to prepare to json_encode the array) ?
@mojotaker It's possible. Is the structure of the array always the same?
thanks for answering, the query results always have the same structure. But the deal is i want to transform the results into a format that is needed by a javascript ui widget on the client side
@mojotaker Can you post an example of the array?
i have seen examples with pure php and mysql, i just wanted to know if its accepted or okay to take the array and build a new one
03:32
ok let me paste the result array
See i told you the question is silly but for some reason my brain wont let me move forward without an answer. THank you very much
@mojotaker if you wanted to avoid crating the new array, you could say unset($yourArray["key you don't want"]), which would actually delete the key rather than just nulling it out
Thank you, But the original (result) array is actually complex , but the specified json is simple 2d
and i really dont need all the key values from the original query. But i do appreciate your help.
@mojotaker You can use something like this:
$result = array();
$result['key'] = $array['key']['foo']['bar'];
03:48
@ShaquinTrifonoff That is what i have in mind. thanks. Let me show you guys what im doing just to make sure my head is functioning right
@Petah Well, it's private. It's not meant to be touched from outside the class.
@blackbee I had something come up, sorry I just stopped responding.
@ShaquinTrifonoff ok here is the complex query result
array(
(int) 0 => array(
'Patient' => array(
'id' => '1',
'agency_id' => test,
'firstname' => 'john',
'middle' => 'tow',
'lastname' => 'dow',
'dob' => '2007-06-30',
'Phone1' => '9324754326',
'Phone2' => '9324754326',
'street1' => '7350 mario dr',
'city' => 'star',
'zipcode' => '79050',
'medicarem0065a' => null,
'medicarem0065b' => null,
'gender_id' => '1',
'race' => null,
'ssnm0064a' => null,
'ssnm0064b' => null,
'patientcol' => '',
'patientid' => '2361',
'us_state_id' => '43',
'soc_date' => null,
(see full text)
user895378
@LeviMorrison Okay -- I think I finally have everything working. I was pulling my hair out because I was testing against a web site that is sending out bogus HTTP messages. OMG.
@ShaquinTrifonoff and here is what intend to do to create the needed array
03:56
@rdlowrey What do you mean, bogus messages?
0
Q: Name of a class that creates a bunch of classes for a process

Levi MorrisonWe all know that the hardest parts of computer science deal with cache invalidation and naming things; my problem is the latter. I have a process that raises events when various things happen. Rather than creating all of the objects for all potential events before the process is started, I have ...

user895378
Apparently, if you send a GET request to www.espn.com you get a 301 redirect to espn.go.com. No problem, right? Welllllllll if you happened to send a Accept-Encoding: gzip header to www.espn.com in your GET request, it will not send you back not only gzip, but regular HTML -AND- gzip. Which was causing errors in my gzip decompressing. FREAKING IDIOTS. gzip encoding means you gzip encode the ENTIRE entity body.
@rdlowrey . . . I must see this in action.
@mojotaker - I'm just answering a question, I will be back soon.
@ShaquinTrifonoff cool please take your time
user895378
If you send this request:
user895378
03:58
new StdRequest('http://www.espn.com', 'GET', array('Accept-Encoding' => 'gzip, identity'));
user895378
They send back these headers:
user895378
HTTP/1.1 200 OK
Content-Type: text/html; charset=iso-8859-1
Cache-Control: max-age=15
Date: Wed, 15 Aug 2012 03:59:55 GMT
Age: 7
Connection: Keep-Alive
P3P: CP="CAO DSP COR CURa ADMa DEVa TAIa PSAa PSDa IVAi IVDi CONi OUR SAMo OTRo BUS PHY ONL UNI PUR COM NAV INT DEM CNT STA PRE"
Set-Cookie: SWID=D14BF52D-8B0D-42F8-B1D5-7F314387D095; path=/; expires=Wed, 15-Aug-2032 03:59:55 GMT; domain=go.com;
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 40229
foreach($result as $row)
{
$customers[] = array(
'CompanyName' => $row['CompanyName'],
'ContactName' => $row['ContactName'],
'ContactTitle' => $row['ContactTitle'],
'Address' => $row['Address'],
'City' => $row['City']
);
}

echo json_encode($customers);
user895378
Notice the Content-Encoding: gzip line
user895378
Except the only thing is they send back an entity body with regular html and append a gzip version of that regular html onto the end of it.
user895378
04:01
THAT'S NOT GZIP
@LeviMorrison yep I know, reflection worked though. The problem was I had a library that I couldn't edit, which was chewing up memory for no good reason.
user895378
Of course, this only happens if you request www.espn.com and not the correct address, espn.go.com
@Petah What kind of shady library are you using? :)
user895378
Yeah, there'd have to be a very good reason to fiddle with the private properties of a library you're using. And by that I mean ... there's never a good reason to fiddle with the private properties of a library you're using.
PULL REQUEST!
user895378
04:04
Either the library is crap or you're doing something you shouldn't be doing ...
user895378
So I now have an HTTP client that does EVERYTHING.
user895378
auto redirection inside multiple parallel requests, multiple persistent connections to the same host ... the works.
But it can't even visit espn.com?
@blackbee , if you are not willing to show the REAL code, then we are not willing to help. This is a PHP chat room not a fortune-telling parlor
user895378
@LeviMorrison No, that's not what I'm saying. It can visit espn.com. www.espn.com does a 301 redirect to espn.go.com -- I've been using that as one of my test sites for redirection. It's just that the entity body of the 301 message (which no human ever sees because browsers automatically redirect) is not correctly gzip encoded. This is a problem because that same 301 response includes a Content-Encoding: gzip header. If you try to decode it, you can't.
user895378
04:14
So because they were sending an incorrect HTTP message, I thought there was an error on my end, when in reality, everything on my side worked perfectly.
user895378
I just need to tell it to ignore gzip decoding errors on compressed responses.
@mojotaker Your code is fine, apart from the fact that it doesn't match your sample data.
user895378
The other option would be to repeat the request using an Accept-Encoding: identity header in the event of failed content decompression like that.
user895378
Which I suppose I could automate ...
user895378
It's such a crazy niche case
04:16
@ShaquinTrifonoff lol, lol thanks im very grateful for your time. Have a good day.
user895378
And no one would ever catch it because literally no one sees the entity body content of redirect responses because browsers redirect transparently. You'd also never see it using PHP's http stream wrapper or cURL because they don't preserve the entity bodies from redirected messages.
@CAM How are you doing with your project?
user895378
@LeviMorrison The only reason I catch it is because the client preserves the entity body from each response in the redirect chain.
@rdlowrey maybe. How common is it? There's no way of knowing. Maybe espn uses a famous plugin to do the encoding and millions of websites do the same thing.
user895378
@LeviMorrison No, I get it, but it's a non-issue.
user895378
04:19
Just as a stop-gap measure, I'm going to automatically re-request a resource if a decoding error occurs like that with Accept-Encoding: identity to guarantee receipt of valid data even if the other end has an error on their end that has to do with the encoding of the entity-body.
user895378
And do the same as when an invalid relative Location header is specified in an HTTP response ... add a Warning header to the subsequent response mentioning the problem that occurred.
I hate humans
user895378
the only problem with wide adoption of a concrete internet standard like HTTP is having to support all the morons who implement it incorrectly.
2
@rdlowrey :)
user895378
It's really amazing. You work your fingers off complying to standards and then realize, "Oh, wait. Some idiots can't be bothered to do it correctly, so I now get to cover up for their stupidity."
user895378
04:32
I mean, ESPN is one of the largest, most visited sites on the planet. And yet they send out an entity-body and say it's gzip-encoded even though it clearly isn't. I get it -- For a redirect message, it kind of makes sense to have a human readable part so people who don't automatically get redirected know what's happening. BUT if you're going to do that, don't send a Content-Encoding: gzip header.
user895378
I suspect some ill-conceived content negotiation module is behind the problem. It saw my Accept-Encoding: gzip,deflate,identity header but couldn't parse that to mean that I also accept identity only.
user895378
/rage
@Troy I made a 'No-IE' picture.
user895378
And I should mention, just for good measure, that IE sucks.
@rdlowrey I know. I'm making an Internet Explorer Countdown site.
For all IE versions, not just 6 (ie6countdown.com).
04:40
@ShaquinTrifonoff apparently thats not a lot in the domain real-estate
@Nile For good domains like that, I suppose. Not a standard .com that you can get for under $25.
@ShaquinTrifonoff to purchase one, but to buy one thats already made...
@Nile Yes...
I'm adjusting the background-image for the header.
There, that's better.
user895378
@LeviMorrison Let the sexy-ness ensue:
user895378
$requests = array(
    new StdRequest('http://stackoverflow.com/users/895378/rdlowrey', 'GET'),
    new StdRequest('http://stackoverflow.com', 'GET'),
    new StdRequest('http://www.espn.com', 'GET'),
    new StdRequest('http://espn.go.com', 'GET'),
    new StdRequest('http://scores.espn.go.com/mlb/recap?gameId=320814115', 'GET'),
    new StdRequest('http://espn.go.com/mlb/team/_/name/atl/atlanta-braves', 'GET'),
    new StdRequest('http://www.nytimes.com', 'GET'),
    new StdRequest('http://www.google.com', 'GET')
(see full text)
04:49
@rdlowrey , what exactly have you been making there ?
2
user895378
That, my good sir, is the same HTTP client I've been working on. The above code demonstrates the magic of parallel requests.
@rdlowrey But how does it compare to sending one at a time?
user895378
All of those requests were retrieved in full in ~1.4 seconds in parallel. A couple of those addresses require redirection as well, so in reality there are 10-12 requests that had to be made and received to do all that.
user895378
@LeviMorrison It depends -- when you make requests in parallel using Client::sendMulti you have to wait until all the requests are fulfilled. So it just depends on the slowest response in the group.
user895378
Here's an example with one single request:
user895378
04:53
$request = new StdRequest('http://www.espn.com', 'GET');
$start = microtime(true);
$response = $client->send($request);
$end = microtime(true);
$time = $end - $start;

echo "\n~ $time seconds\n\n"; // ~ 0.78046488761902 seconds
user895378
^ that's with one 301 redirect from www.espn.com ---> espn.go.com
user895378
And that's the night for me. I've spent way too many hours at this desk in the last three weeks. Later.
G'night.
05:20
@AlexCastro Why did you remove your question??
just got the solution
just clicked.
Hello.
Hi @Troy! You're back!
@ShaquinTrifonoff How are you doing man?
05:29
Pretty good. A bit slow, though :-) I've made a logo, did you see it?
No, you didn't give me a link.
@Troy It's also further up in the comments.
Lol, at least it's not an official one. Good job :)
Yeah, I just got the color from an IE logo, and drew up an Arial E in Paint.NET.
@ShaquinTrifonoff Don't tell me you're going to buy iecountdown.com :P
05:33
@Troy - No, I can't afford that!
@ShaquinTrifonoff Lol, okay j/w :P
@Troy I'll get iecountdown.tk.
(it's free.)
Okay buddy.
@Troy How are you doing?
Really great, thanks.
05:38
Got any projects on the go?
@ShaquinTrifonoff Yeah, working on a new product to sell on the marketplace. But not for me, but a team my friends and me have started :)
@Troy That's good. My website is down right now because I sent 1000 messages to myself.
:D (rofl)
What is your website URL?
I see, when will it be back up?
05:43
I don't know... It's suspended indefinitely unless I upgrade to their paid hosting. The annoying thing is, they don't tell you that you can't send 1000 messages until you have.
Yeah. But why would you send a thousand messages to yourself?
The messages were coming from a script that I made, it would email me whenever I got a new visitor.
@ShaquinTrifonoff Oh, I see.
See comment above.
Happy Independence Day :)
05:44
What do you do on your website?
@fluty Sorry, we're not all Indians...
@fluty But happy Independence Day to you, if you are Indian.
@Troy Web development. I had a whole lot of tests/experiments on one part of my website, that I would link to as live examples from my answers on Stack Overflow. I did that so I could use PHP, and also so that I knew how many people read my answer :-)
@ShaquinTrifonoff Can you create a room between you and me only so I can tell you something?
@Troy Sure...
@Troy - All rooms are public and anyone can post, is that fine?
@ShaquinTrifonoff No, private, please. Or do you use Skype? I'm an active Skype user.
@Troy I don't have Skype, can you email me at shaquin(dot)2(at)nospamlive(dot)com?
05:55
@ShaquinTrifonoff :D Nice email.
@ShaquinTrifonoff I will. Hold on.
Can anyone tell me why this breaks when I add the order by?
@AlexCastro How about LIMIT 5 ORDER BY id DESC?
@ShaquinTrifonoff negatory
"Column 'id' in order clause is ambiguous"
@Troy Well, your recommendation for justhost has been most duly noted. bluehost has been having problems off and on for the past few days....
@AlexCastro Does LIMIT 0,5 work?
05:59
@ShaquinTrifonoff What fixed it actually was doing tablename.id
It didn't know what table I was getting it from

« first day (669 days earlier)      last day (4505 days later) »