« first day (1038 days earlier)      last day (3910 days later) » 

7:02 PM
I'm having really frustrating issues with a file upload process... Am I doing this right? Please help me out...

<form enctype="multipart/form-data" name="instform" method="post" action="" name="postform" style="font-size: 12px;">
	<input name="title" type="text" placeholder="Title"><br>
	Picture Upload: <input name="instdp" type="file"><br>
	<input type="hidden" name="fileupload">
	<textarea name="content" type="text" placeholder="Content"></textarea><br>
	<input type="submit" value="Submit" name="postsubmit">
 
Nope, keep trying.
 
@HamZa That is amazing.
 
@John Please format you code with ctrl + k
 
@John What's wrong with it?
 
@DaveRandom Welcome to docs!
 
7:03 PM
And try to describe the problem if you want an answer
 
@Charles yeah, sometimes I wonder how it came to their minds ...
 
@John this part <input type="hidden" name="fileupload"> is not right ... google for form inputs that let you upload files
"hidden" is not it
and no, we will not write the "correct code" for you
 
@NikiC where were you :O ?
 
@tereško Y'know, he actually speaks fluently, I don't think he's gonna be a "pls geiv me teh codes" type based on that...
 
Too many pinned messages!
 
7:07 PM
@Charles which is why i actually answered and gave pointers, instead of adding to the ignore list
 
daverandom approved by bjori \o/
All hail @NikiC.
@DaveRandom Mazel tov!
Now, shop that wishlist and send 5 elephants, some nice chocholate and a bottle of wine.
That'll do for now.
 
-6
Q: where do hackers hide stolen data

icemanWhat do you think what are the best ways that a hacker can hide stolen data in any situation. I em doing a presentation for Defcon about how data is stolen and what techniques are used.

> I em doing a presentation for Defcon about how data is stolen and what techniques are used.
lolwut
 
Translated, I'm dreaming while I'm typing this ...
 
/facepalm
 
@PeeHaa lol
 
7:13 PM
:P
 
7:25 PM
Accessing weird parts of the internetz
 
@Hamza really regex?
 
@Orangepill hehe yeah :)
It was a good exercise
 
@I'll-Be-Back yo
 
@webarto sweet
@webarto wonder what the pricetag will look like
 
Does any of you here have some experience with JPgraphs etc? for building a normal distribution chart?
 
Oh hey @Hamza
 
yaay
 
7:57 PM
@HamZa o_O
 
how to get a file with file_get_contents() and treat it like a file retrieved as: $_FILES['file'] ?
trying to get from url..
 
@igorw that's what he said. Really, how can someone give a presentation at defcon with such a question ?
@bushdiver E_UNCLEAR
 
@HamZa ?
 
@bushdiver What would you like to do ?
 
I would like to get file from URL and then access FIle properties, name ect
All i can seem to do with file_get_contents() is store it somewhere..
 
8:04 PM
@bushdiver lol, you download the file with file_get_contents and then use proper php functions to extract more info (you need)
 
what would the proper function be to access it as $_FILES['file'] ?
 
3
Q: How to optimize an if else if statement where previous ifs are not used in loop?

rotaerczThis is hypothetical code, assuming I have the following: Let's say I have an array and it has lots of data, integers in this sample question, but it can any type of data that's already sorted $a = array(0,0,0,1,1,1,1,1,1,2,2,2,2,3,3,...,9,9,9); Let's say I have a for loop with numerous if el...

Interesting question ^
 
@bushdiver ok, I will say it straight: it doesn't make sense. What would you like to extract ?
 
@bushdiver Instead of asking for some solution you should tell us the actual problem at hand instead
 
the properties of the file @ URL. what is the process, download it first by fopen() or file_get_contents() and then open it from local system? - i would like to store it temp and check properties before storing it locally
 
8:08 PM
Problem? He doesn't have a problem, he has a f* problem*s*, plural.
 
:/
 
What does "@ URL" mean?
 
at the url
 
And what is the type of the file?
 
image file
png / bmp / gif
 
8:09 PM
@bushdiver well $_FILES are also stored somewhere on your hard disk
 
What properties are you looking for?
 
@bushdiver And when you say properties, what exactly is that?
What @PeeHaa said.
 
name, type, size
 
@bushdiver you know the name because you are downloading the thing
strlen will give you the size
And the type can be inspected
 
19
A: Super fast getimagesize in php

webartofunction ranger($url){ $headers = array( "Range: bytes=0-32768" ); $curl = curl_init($url); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($curl); curl_close($curl); return $data; } $start = ...

I present the most crappiest answer, ta da.
 
8:10 PM
lol
 
Headers, man, headers.
The answer is out there.
 
I like what you did there
Have a +1 good sir
friend, pal, dude, mr
 
@PeeHaa when you say inspected, do you mean via parsing the url?
 
@bushdiver Not the URL. The actual contents of the file
 
for the ext
 
8:12 PM
Danke schoen, Herr @PeeHaa.
 
posted on August 19, 2013

The 9th Annual ZendCon - hosted by Zend - will bring together developers, IT managers and PHP experts from around the world. With a focus on PHP, mobile and cloud development, attendees at this highly acclaimed conference will expand their skills and explore new technologies. The conference is scheduled from October 7-10, 2013. For mo

posted on August 19, 2013

CodeConnexx is a two-day, one track conference that aims to bring together everyone interested in talking about code. As we know, choosing a career as a coder comes with its own set of life challenges, and we want to talk about those too. In short, this conference is a different kind of conference, as it connects those two pieces of the puzzle t

 
An extension means nothing
See @webarto's answer
 
GASP @webarto you don't have 10k yet?!
 
@MadaraUchiha I opened front page 2h ago, and wanted to get that 1k, and I started crying, I don't know why.
This turned into a programming forum.
 
@webarto I know :(
Try the one I linked above though, it looks interesting
@webarto I did make an offer that still stands though
Make an excellent Q&A topic on lacking subjects, and I would award +500 bounty.
I'm specifically looking for someone with under 20k to help him reach that.
 
8:15 PM
...
 
Thank you very much, adon @MadaraUchiha.
I shall consider that offer.
 
Now to remember what the lacking topics were :D
 
jQuery!
 
@MadaraUchiha what's 10k?
 
@Ocramius Offer extends to you as well.
@webarto I'll require you to pay me 500 bounty for that one.
 
8:18 PM
Yes, but is it good stuff? Can you get high enough on it?
 
lol
 
3Y ago. Oh, the times.
 
@webarto what kind of image does imagecreatefromstring create? do i set the content type?
 
It creates an image from string.
 
@bushdiver The idea is to send a header to not download the whole file, since the beginning of the file contains mostly enough information about the type
 
8:20 PM
@webarto won't this do the same thing without the raw function? imagecreatefromstring(file_get_contents($src));
 
I don't know, try it.
curl -iL --head news.softpedia.com/images/news2/Debian-Turns-15-2.jpeg
HTTP/1.1 200 OK
Date: Mon, 19 Aug 2013 20:12:08 GMT
Server: Apache
Last-Modified: Mon, 18 Aug 2008 09:29:13 GMT
Accept-Ranges: bytes
Content-Length: 91504
Cache-Control: max-age=2592000
Expires: Wed, 18 Sep 2013 20:12:08 GMT
Content-Type: image/jpeg
 
@webarto @Ocramius Here you go
18
Q: Data Mapper Pattern

MegaByteUp until now I've been using Active records in all my c# database driven applications. But now my application requires my persistence code being split from my business objects. I have read a lot of posts regarding Martin Fowler's data mapping pattern, but my knowledge of this pattern is still ver...

 
@webarto lol .. it would be worse if you opened the post and that 9-vote answer had a downvote from you
 
Looking for @tereško level answer on this one. @tereško is too lazy busy to get it done, so the offer extends to you guys as well.
 
@MadaraUchiha I have actually tried to write an answer for that one several times , but I get distracted after an hour-ror-so of research
 
8:22 PM
@MadaraUchiha I'm not really looking for rep, heh
 
@MadaraUchiha waaaaay out my league, thanks tho.
 
Or if you want, start your own new question, and reap all the rep.
 
@Ocramius is loaded, he doesn't need fake rep money.
 
also: way too lazy
 
@webarto There were other subjects I remember wanting, but can't remember or find it now :P
 
8:22 PM
@webarto nailed it.
 
Is there something about downloading free pr0n and stuff? :P
I joke, I joke, I kid.
 
Where can I turn in my rep for cash? -_-
 
@webarto how about secure persistent login cookie?
 
here
I pay in blueberries
 
@Fabien It happens automatically when you reach 1,000,000.
That's where Jon Skeet is heading.
 
8:25 PM
lol
 
he'll get $1?
 
Is there actually a leader board anywhere?
 
yes , there is
 
@Ocramius Aren't you supposed to pay in shrooms?
 
all time rank: #1342 .. I'm too lazy to repwhore
 
@PeeHaa these are reserved
you know, they're need for some particular activities
 
booooooo
 
Well? @webarto what do you say?
 
All time rank: #5936
 
8:28 PM
@MadaraUchiha I say, meanwhile, while selling crappy WP themes notes.envato.com/milestones/… :(
 
@webarto Want the offered bounty or not? :P
 
Cheers @hamza. Jon skeet reppin' the UK.
 
@MadaraUchiha Thank you, I'll pass for now, I'm in my working hours, need to finish real job :P Thanks again.
 
@Fabien Well I'm not really into rep-farming now
 
I've got an <input type="file"> that I'm trying to upload to a server -- someone have the time to walk me through (or point me to a tutorial) of what to do?
 
8:30 PM
What's the 'boundary' of a module? I'm writing a modular CMS with CodeIgniter, just for practice and I've read a few articles stating I should make a module for each model class.. is this correct?
 
Obviously C# requires a lot of questions.
 
@RavenDreamer Where are you stuck?
 
@MadaraUchiha Best EVAH
 
@webarto Found it only recently, had to use it :D
 
@Ocramius ehehe
 
8:31 PM
@Raven There are plenty of questions on SO that deal with this topic, have you searched for your problem and tried anything yet?
 
@MadaraUchiha Perfect timing.
 
@RavenDreamer the internetz is full of good and bad examples
 
@Mittchel how can you be writing "modular CMS" if you do not know what a module is in said CMS?
 
Well, I'm trying to build one lets put it at that haha
So I'm not really sure where to cut my pieces of logic into modules
 
@MichaelIrigoyen cc @MadaraUchiha Yes. I've gotten to the point where the HTML is correct (it selects a file from the user OS) and I've stuck it in a form that can be submitted. What I'm not sure about is how to go from the form to sending the file to the server, and how to set up the server to watch for and receive the sent file (for server-side saving).
 
8:33 PM
argh
someone escavate my eyes out of my head
I gotta write YAML
 
I think I'm in a terminology mire, in that I don't know what to call what I need to do (and so can't search for it by name)
 
@RavenDreamer If you have a file control and you're submitting the form, the file should be sent to the server.
 
@Ocramius Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo‌​ooooooooooo
 
From there, you handle it using PHP's regular tools, it's all there in the manual
 
@tereško so could you point me in the right direction?:D
 
8:35 PM
@Ocramius Careful with that Space and Tab.
 
@Ocramius Shirley you mean "write an array and then convert it to Yaml with a tool?"
Or are you the tool in this case?
 
eh...
 
@RavenDreamer Check out the PHP manual for handling file uploads: php.net/manual/en/features.file-upload.php
 
Doctrine2 requires a sacrifice.
 
Also:
 
8:36 PM
Who invented YAML should be forced to answer for all YAML typos that will EVER exist.
 
Ah @MichaelIrigoyen beat me to it :D
 
Brit 1: Hello, how are you? Brit 2: Fine thanks, you? Brit 1: Not too bad thanks, you?
 
@MichaelIrigoyen Will do, thanks.
 
No problem, best of luck
 
All those dots, those sexy dots.
 
8:39 PM
Notepad++ ?
 
I don't always press Tab, but when I do, it's 4 spaces.
10
 
While I like a good dark theme, I do not like that.
 
Yeah @Pheagey. I do use Notepad++.
Yes, I want my eyes to fall out.
I want to suffer.
 
@webarto Now that drives my OCD bonkers, I hate it when it's spaced and not tabbed out.
 
@MadaraUchiha Thinking about that question, I think that a separated for-loop is one way to solve it, but there should be an else break in it
 
8:40 PM
/me boooooooos @MichaelIrigoyen
 
@webarto
Let me introduce you to the wonderful world of Sublime Text... http://www.sublimetext.com/
 
If we want to get more performance, maybe unset some values ?
 
@MichaelIrigoyen now your OCD going bonkers makes my OCD go bonkers. I hate it when it's tabbed and not spaced out.
 
+1 for Sublime
 
@Fabien right!
 
8:41 PM
Haha, why press the spacebar 8 times when you can press the tab key twice? It's about typing efficiency!
 
The wars of the mentally ill people!
 
@MichaelIrigoyen You prefer tabs over spaces?
as in, TAB characters
 
@MichaelIrigoyen open your text editor. set tabs to spaces. press tab twice
 
I use tabs but my tabs are converted to 4 spaces.
 
@PeeHaa YAYHRDSIPNASP<!ADKL!
 
8:42 PM
May 27 at 14:41, by HamZa DzCyberDeV
user image
 
/me is seriously bored
 
:P
 
Let's hack.
 
@HamZa haha
 
@MichaelIrigoyen as long you're consistent it should be fine:)
 
8:43 PM
I figure, as long as your consistent, it's just a matter of preference.
 
4 mins ago, by webarto
I don't always press Tab, but when I do, it's 4 spaces.
:)
 
You ever work at palace where they strongly enforce coding standards. One place I had to use eclipse and I should never be able to tell the difference between two devs code
God I hate eclipse.
 
@Fabien I haven't worked at a palace yet.
 
0
Q: How to get the timestamp of curl request before it sends?

Brian WThis might be impossible but... I'd like to grab the Request Time of a CURL request just before I send it out. The goal here is to check that the $_SERVER['REQUEST_TIME'] that I receive on the other end is the same as the request time I have when I send it out. I tried just using <?php echo tim...

ERMAGHERD
 
@webarto lol
 
8:45 PM
@Pheagey I actually have a license for that, should get used to it, thanks for reminding me.
 
On iPad, cut me some typo slack :(
 
"iPad" (Dr. Evil meme)
 
@webarto Do you use GiT/Composer/terminal at all?
 
@Pheagey I basically watch Youtube through terminal.
 
@webarto hua :) nice.
 
8:48 PM
php youtube F90Cw4l-8NY
Lady Gaga, f* yeah!
 
1
A: How to get the timestamp of curl request before it sends?

Madara UchihaNot doable. Even if your servers are perfectly synced with their clocks to the millisecond, hardware hiccups, network latency, too many variables for it to reach at the very same second. Do not use time for salts, generate a strong random one. As for the actual question, calling time() will ...

 
Apart from not doable, I'd suggest you consider other options. — webarto 24 secs ago
Wanted to write, this is just stupid, but held myself back :P
 
@webarto faith in humanity restored
 
But it is stupid :P
Thank, tho, @HamZa.
 
@webarto I know, sometimes I really wonder if some people are stupid or is it us being smart ? Or is it both ?
 

« first day (1038 days earlier)      last day (3910 days later) »