« first day (735 days earlier)      last day (4439 days later) » 

00:18
Hey guys
hi
Can you please help me out? my if statement isant working.
post it
"$httpfromurl = $exploded[0];

$http = 'http:';

if ($httpfromurl = $http)
{
echo 'working';
}

//check website chars to say if up or down
if ($count > 35) {
echo "$url Seems to be up.";
} else {
echo "$url Seems to be down.";
}"
if ($httpfromurl = $http)
{
echo 'working';
}
isant working
which one isn't working. You posted 2
sorry, 3
00:25
if ($httpfromurl = $http)
{
echo 'working';
}
Is the part not working. the first post was the if statement in context
what are you trying to do ?
and please , notice the "fixed font" button ... use it
...and why are you not using parse_url()?
what is the value of $exploded[0]?
$exploded[0] is part of a url up to /
$exploded = explode( '/' , $url );
what is the true vakue you're working with
*value
00:28
1 min ago, by DaveRandom
...and why are you not using parse_url()?
and I second @DaveRandom
i probably should use parse_url
but regardless the if statement is not working
it work's just fine
:)
check the value of $exploded[0] it's probably not what you expect
@henrymb67 it's just that if( $httpfromurl = $http ) .. emm ... you have an assignment statement there
00:31
* the if statement is not working in my script the way i'm using it
I overlooked that one ;)
use ==
if you listen, you will here the sound, that is made, when hand connects to face
ooooooooohh
i feel pretty stupid
thanks
it happens to everyone!
00:48
I have another issue...
$finalurl = 'http://' . $url;
should add http:// before $url
but
it adds nothing at all
anything i'm doin wrong?
@henrymb67 Using the $url variable instead of the $finalurl variable afterwards? :D
i did echo $finalurl to see if it was working...
and it did not
@henrymb67 Can you provide the lines of code around it?
ah yea
// get the url and save to $url
$url = $_GET['url'];

// get contect of the url and save to $website
$website = file_get_contents($finalurl);

// count chars of $website
$count = str_word_count($website);

//explode crap
$exploded = explode( '/' , $url );


$httpfromurl = $exploded[0];

$http = 'http:';

if ($httpfromurl /= $http)
{
$finalurl = 'http://' . $url;
} else {
$finalurl = $url;
}

//check website chars to say if up or down
if ($count > 35) {
echo "$url Seems to be up.";
} else {
	echo "$url Seems to be down.";
brb
01:25
// get the url and save to $url
$url = $_GET['url'];

// get contect of the url and save to $website
$website = file_get_contents($url);

// count chars of $website
$count = str_word_count($website);

//explode crap
$exploded = explode( '/' , $url );


$httpfromurl = $exploded[0];

$http = 'http:';

if ($httpfromurl == $http)
{
$finalurl = $url;
} else {
$finalurl = 'http://' . $url;
}

//check website chars to say if up or down
if ($count > 35) {
echo "$url Seems to be up.";
} else {
	echo "$url Seems to be down.";
@henrymb67 Terrible code, but anyway...
02:04
@ShaquinTrifonoff Thanks
Hello
anybody here experience with apps willing to give feedback to my app?
?
 
3 hours later…
05:23
Hey, I just wrote this Windows program test in PHP, if anyone wants to try it... temp-share.com/show/gFHKkqxTY
hellw
does any one know how so question show in google search even before a minute
@rdlowrey hii please see my message above and if you know about this ..please let me know
06:14
Could you please help me to solve this? stackoverflow.com/questions/12985799/…
I want to share a audio file in FB
through my website
I can share video, but could not share audio
06:44
Please help me if any know the answer, I googled it and got no answer
06:58
hi guys
hi Sidath
how can you verify recaptcha?
the documentation is imcomplete
I did.
how can you find this=> require_once('recaptchalib.php');
plus, the link doesn't work
okies
07:07
will see the lib.php file
thanks
And could you please have a look at this..stackoverflow.com/questions/12985799/…
Do you know any thing about this?
@varada your Ques :How can I do the same for audio? Shall I just change video to audio and provide the url of that audio?,That means you have not tried it for audio
@tereško Hey thanks for the book recommendation, its a pretty good reference and it actually mentions the approach you were so against earlier (ActiveRecord pattern). Turns out model classes inheriting crud functionality is one of the more popular approaches, its also used in Google app engine. According to the book, the best use case is when the model classes are isomorphic to the db tables which pretty much makes the use of an orm moot. Thanks for the help, didn't mean to get you frustrated :P
@Varada. see your question.
@sidath thank you for your help :)
07:39
@Varada sure thing bruv!
user1125394
well looking the ubuntu 12.10 release updates, first thing mentioned is the wallpapers
08:35
if we sent html base email to multiple recipient with loop so one To: at time
so its go on spam ??
user1125394
if your email sounds indian yes
means indian ??
09:18
2
Q: "Use PDO" in MySQL Table. Is this a hack?

Dr.KameleonOK, it may sound ridiculous but this is what happened : I've set up a site, fully working, on CodeIgniter The site is obviously db-driven, with users tables (and many more) in it Today, I've logged in, and in the place of "Name"... instead of the username, I'm seeing "Use PDO" (I've also checke...

omg lol
I should start doing that too
09:59
any solution ??
@DanishIqbal Instead of sending in a loop, send to all recipients at once with a hidden CC.
@MadaraUchiha my client need newsletter type actually he want to sent to emails to his clients
@DanishIqbal You send it to all of his clients
All of them, in a single message, and all of them are listed in the hidden CC.
This way, no one gets to see who are the other addresses, and the email engine might not view you as spam.
Regardless, it isn't your choice whether or not your mails are considered spam. There are other factors in play, such as the domain from which you're sending, other user reports of your mails and other mails you may have sent, etc.
so cc better
@DanishIqbal hidden CC
You don't want to give away all the addresses for all of your subscribers, otherwise you're exposing them to spam.
user1125394
10:14
Cci
hmm so how can i make hidden CC
actually i dont have much knowledge of PHP
@cyril and @MadaraUchiha thanks :)
user1125394
sorry it's called Bcc in English (blind carbon copy)
morning...
10:23
@cyril i think there is two different CC and BCC
php
hi in php can we detect that browsers js is disable
morning
morning
@Saurabh Nope. PHP is serverside and JS is clientside
@PeeHaa ok
@PeeHaa my problem is that >30% functionality of my site is based on JS, Site is in PHP, client needs when js is disabled then site wrking perfectly
suggest me how i manage this
there are some ajax requests also
10:30
@Saurabh If you create anything on your site which only works with js enabled you have a huge flaw in your design
You should make anything in a way that when JS is enabled it is great, but when it is disabled everything still works
ys ,i did this mistake
now needs any solution
@Saurabh Well can't you just fix it?
What exactly are we talking about?
some functionality like auto suggestion when enter anything in search box
that is true
well that will get cut off if no js is enabled
ys :(
Is there any way to forcly enable JS of browser, when site loads ??
10:33
@Saurabh Auto suggest I consider nice to have but not really needed to use the site (in most cases)
@Saurabh Ofc not
@Saurabh users can disable it totally
but the search box should still work
@PeeHaa ok
@kabuto178
10:49
@RoryBreaker books are meant to be read from the beginning
it's like getting a GoF book and read only about Singleton pattern, bcause that's what you have decided to use.
well you do have to follow up on the topics from before as they are linked most times
Looks like it's too early for cv-ring :(
too late for it now
11:04
   $ in preg_match("/$item\$/i", $_FILES['uploadfile']['name'])
could anyone tell me what is the meaning of the
$ in \$/
@NullPointer It's a $ :)
@PeeHaa :) ... could you tell me why this is used like that ?
Like what?
@PeeHaa like /item\$/i
@NullPointer Because $ is a special character in regex it is escaped
11:13
@PeeHaa could you explain the "/$item\$/i" ?
@NullPointer Where is it used?
Ow btw I just noticed the double quotes instead of signle quotes
What are you trying to do?
its used to check the file extension if its php than dont let user upload the file
could you provide any good regx tutorial link
@NullPointer Because it is in double quotes it matches if $item is at the end of the subject
$ means match end of string
$item = whatever is in it
Seems to me like a wrong approach to verify filetypes
and also why the \ before the $
is there any use of it
11:23
@PeeHaa thanks
11:42
do you know how to make FilesystemIterator append a forward slash if the node is a directory?
12:08
0
A: jquery ajax is loading entire external html rather than targeted div

NullPointerhere is the problem you can not pass value to the html page you are getting the entire code because in success you get the data written in the page and in html page there is all url: 't3.html #test',

well i am out for the night, take care everyone
@kabuto178 good night
Good afternoon ladies
@PeeHaa i have learnt php is it better to use any framework or just use the custom php ?
posted on October 20, 2012 by Lukas Smith

Back when PHP5 came along in many ways it meant a new stepping stone for PHP. To some extend this was caused by the fact that it was impossible to write E_STRICT compliant code that also worked on PHP4, since initially using "var" for properties didn't pass strict mode. As a result many people used this as an excuse to start over and I think overall this led to higher quality code, since the co

12:17
@DaveRandom hiya dave
/ chris :P
@NullPointer I you haven't learned PHP I strongly suggest first learning PHP before even thinking about using a framework
i second that
do learn php , then learn about OOP and only then start looking at frameworks
and if you are gonna tell me that you already know OOP, it's a one-way ticket to the ignore-list
12:44
Does anybody know where I screwed something up? Because DOMDocument keeps messing up my encoding: codepad.viper-7.com/LrtGTu
@PeeHaa codepad.viper-7.com/N3LEsP - You missed a . off a .= when wrapping the fragment in <html> ... </html>, however if would seem that XPath text() treats <title> as a text node. Suggest you do /html/body//text() like codepad.viper-7.com/v7wv5T
omg. lemme get my catch phrase again :(
Sep 30 at 19:30, by PeeHaa
Fuck me I'm stupid
13:00
Yay!
Thanks @DaveRandom :D
I'm surprised it required the <meta>, I wonder why the encoding argument to the DOMDocument constructor isn't enough?
@DaveRandom That is stupid indeed. I think it also depends on PHP version. Not sure though.
Best to do it for safety I guess. Don't forget that if you are allowing an encoding argument to your object's constructor, you should use that encoding in the <meta> tag otherwise it's kind of pointless to have the argument there at all...
Yep. Although I think I'm dropping the parameter. Everything I use / see / build is utf-8 anyway
13:06
Life would be much easier if everyone quit buggering about and just used unicode for everything.
whats the best way to send bulk emails ??
actually my client want to send emails to his clients
@DaveRandom Life would be great
> What's that you say? Adopt a standard? No thanks. Thought by Apple, 30 seconds ago
lol
any suggestion ??
13:10
> You think strlen() gets you the number of characters of a string. Ha jokes on you. Thought by PHP, all the time
@DanishIqbal Use a service
which service ?
@DanishIqbal mail service
i am thinking to make for loop in PHP which gets contact email from database
Whatever you do. Don't use PHPs mail() function
i want to make my own
13:12
And don't send from your own domain / ip
but @PeeHaa i worried about spam fillter
Have fun spending time with and paying people like spamhaus ;)
my domain also use google.com email like [email protected] is back by gmail
@PeeHaa I don't know, that particular gotcha has always made sense to be. I mean a string is just a collection of bytes, if I ask for the length I expect the byte length, and I expect to have to tell the language my character set if it's more than one byte per character. I don't like automagic, it's too liable to make mistakes.
You may have a point for that one, but I really dislike all duplicate functions to handle multibyte strings
13:24
@PeeHaa To allow a single native function to handle both cases would be a violation of SRP (not that PHP native functions really give a crap about SRP) - if you were going to do that I think what you need are two different data types - binary string (the current string type) and character string (one that takes character sets into account). Much like (VAR)?CHAR vs (VAR)?BINARY.
Hello.
Is it fine to use += in a sql query?
e.g.
UPDATE table SET count +=1
or with strings...
UPDATE table SET train = train + 'hi'
ah...
cheers! I found it hard to find an answer on google, because google would ignore the +'s and ='s
@JordanRichards If you're looking for stuff like that, the keyword you need is "operators"
Thank you.
@DaveRandom ah
what about taking away?
would it be the same?
UPDATE table SET count = count -1?
13:31
Yeh there are no combined shortcut operators like +=, -= etc in MySQL
or UPDATE table SET count = count - :param?
You have to go the long way around
@JordanRichards Yes, that will work
@DaveRandom Thanks for that note! :)
@DaveRandom both of them?
(as long as :param is an int)
Well the second is just a parameterised version of the first
Yeah ok :)
Thanks for your great answers!
13:33
It's equivalent to $var = $var - 1; vs $var = var - $otherVar; in PHP
@JordanRichards It doesn't have to be an int, it just has to be numeric. It works with floats etc as well.
ah that's good.
:)
Oh one other thing (not that releated to php at all haha)
Is there an actionscript room?
Doesn't seem to be
crumbs :(
I'm learning actionscript 3 to make games for my website
it would of been handy if they had a room here.
Since actionscript is ECMA you might find people who know about it in JS, but don't quote me on that

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
@JordanRichards You could always create one ;-)
I'm still confused to how I can make it harder to interfere with the score POSTING to php
@DaveRandom :O
13:39
@JordanRichards The same problems you find with that most certainly apply to JS and particularly ajax as well.
hmm yes.
Anytime I use ajax, I let the server handle all the back-checking
but with something like a score..
(it's not as easy)
Not really my area of expertise, but I would start here
@hakre your blog is awesome!
@DaveRandom there is no way to prevent forgery of XHR requests
you can make it difficult , but thats about it
user50049
Correct. You can use CSRF tokens, but if you manage to get rogue code in the browser (showing an ad, perhaps?) those are easily compromised.
user1125394
I need to use this at home ubuntu.com/devices/android
user1125394
with a nexus
Kind of a given. HTTP is stateless, and the client side is open source. The combination of those two makes it impossible to guarantee requests cannot be forged. But hopefully that fact is easy to ascertain from Googling "prevent ajax forgery".
14:06
lets see ... making the query
1: tl;dr
2 and 3: something about asp.net , skippped
@TimPost even CSRF protection is easy to bypass right? i mean it'd just mean 1 extra request for getting the CSRF token.
4: got the hit .. OP reads a short article which is will of crap
the bottom line here is that for developers google is good only with non-too-common and specific problems
user50049
@goldenparrot Typically. depending on how you store the token. You'd need to get JS into the browser to read it.
i guess it does depend on how the site implements CSRF protection i guess.
user50049
14:09
(for CSRF), For just XHR forgery that's dead simple
true.
i don't know much about selenium but can it be used in this context? to bypass this protection?
user50049
@cyril That looks interesting .. kind of explains the strong push to unity
user1125394
yep we don't really need pc or laptops, when you are occasionnaly at home, just this dock on your phone and plug it on tv, with a keyboard/mouse
14:27
...and enjoy a user experience that runs like a bag of spanners. I'm sorry, but no. Nice idea, to be worth considering actually replacing my laptop with a phone there would have to be some serious advances in mobile phone hardware. The stuff that's high-spec enough to make it worth while is way too expensive. As soon as you try and actually do anything with if your phone would turn into a pool of bubbling black liquid.
user50049
@DaveRandom I wouldn't replace my PC with one, but I could find some uses for that. Consolidating all of my distractions into something I can carry with me (email, chat, voip, etc). Plus, nice having a decent SSH/FTP client on the device, and some other stuff. I'd use one.
user50049
Basically like using a higher end netbook once docked, from what I can tell. And well, for the stuff I'd use it for .. that's fine with me
@hakre hiya
user50049
But agreeably, that's (of course) not how they're marketing it @DaveRandom
user1125394
14:33
@DaveRandom of course not for a home freelancer, but I see many people buying a laptop just for checking mail and browsing web
user50049
And, @cyril don't forget .. Synergy would probably work on that, so you could use one keyboard / mouse
@hakre hi
^ close and delete please
@goldenparrot hi my-blog-lover :)
user1125394
@TimPost o thx didn't know synergy
user50049
14:36
There's a working android port of it, but the native (linux) client would probably work on the Ubuntudroid
user1125394
it's the administrators friend tool
i was thinking of doing some research about people, and what sites they use for hosting their blogs/websites.. you know anything of this sort being done?
you = all :|
*hosts
*sort done earlier?
:(
I use a VPS and my own server
:)
user50049
@goldenparrot Netcraft probably has the data you want
well i was thinking, putting as many blogs as possible into a list and writing a bot to extract host informations to determine people's choice :)
@goldenparrot I currently use Blogger, but am not satisfied with it. Possibly switching to github.com/mojombo/jekyll
user50049
@goldenparrot I'm pretty sure Netcraft has that data, the task is just finding it.
Also, my blog's not very good
@TimPost i will look for it
@SomeKittens so what about heroku + jekyll ?
that was what you were thinking?
@goldenparrot Nah, GitHub + Jekyll
This is still something I'm really bad at. I just want a simple, free blog provider that'll let me autopost to Twitter.
14:45
@SomeKittens Working on it... ;)
@TimPost well even if netcraft has data about what hosts most sites, I think people will be more interested in what programmers, hackers use for their hosting
so i feel it's worth a try what do you think?
@SomeKittens i use ghostery, and i simply love it
user50049
@goldenparrot If it's something that interests you, sure. But I think you'll find 1/3 self hosted, 1/3 in the PAAS jungle and 1/3 using something like elastic beanstalk
user50049
I work at a hosting company (and have done the same research you're describing)
@goldenparrot I'll check it out
@goldenparrot Are you sure that's a blog provider?
user50049
With blogs you've got companies like zippykid also (and others)
14:53
@SomeKittens no I actually said that because you mentioned twitter. and i block it where ever I go :| really sorry to make you wander :(
The issue is that I'm writing the blog for a class (basically an excuse for me to start the blog that Atwood and Yegge keep telling me to start) and the teacher can't figure out how to subscribe
so he just wants me to post to Twitter, which I can do with Blogger, but it's manual
^these filthy self-question duplicators, we find you all ;)
ok, so i guess i will stay with my 'random webhost 12413' till i find a peaceful place in this world (web).
@SomeKittens I am sure wordpress will allow you to do that.
@goldenparrot But it's Wordpress.....
@PeeHaa @hakre is sharing questions on chat equivalent to sharing on q & a somewhere ? because there is this badge regarding sharing links to q & a right?

« first day (735 days earlier)      last day (4439 days later) »