-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Empty for me too. I don't know why Opera is downloading it. There's nothing indicating it should be downloaded. Can you see what the request and response headers are for it?
-
Alert: The phpfreaks forum members data appears to have been stolen.
requinix replied to gizmola's topic in Announcements
I'm going to start suspending accounts for people who ask for it. mrbraq, rpoelking, darkcarnival: I'll suspend yours tomorrow (to give you time to see this post). -
If you see them again, try to get the full URL to the ad. We can then submit it to our advertisers who can do something from there.
-
You're talking about ads being shown here, right? Can you provide more details about which ad? Like the full path to it? All we can do is report the bad ad. In the meantime I suggest doing something to block the downloads *coughoruseadblock*.
-
Alert: The phpfreaks forum members data appears to have been stolen.
requinix replied to gizmola's topic in Announcements
Don't feed the troll, guys. -
Where's the states() function?
-
1. All of these classes are shapes, right? And they all have the same set of methods, like getArea and getPerimeter (notice the spelling) and scale, right? Making each class completely distinct does not fit into the idea of "all of these are shapes", and simply using methods with matching names does not work for "the same set of methods". Look into inheritance and polymorphism. abstract class Shape { public abstract function getArea(); public abstract function getPerimeter(); public abstract function scale($scale); }2a. The scaling can (should) be done merely with a number. 1.0 is the same size, >1.0 is larger, 2b. Writing up or down tells PHP to look for a constant with that name. If you want a string then use quotes. 3. "a" and "b" and "w" and "l" are not appropriate variable names for things that matter, like the length of a side of a square or of the width of a rectangle. Use good names like "width". 4. A method called "get*" should get a value. As in return something. It should never output anything. And they shouldn't try to format numbers either. 5. Put your classes in separate files. You should learn about autoloading classes at this point, but requireing each file is okay for such a small assignment.
-
Nope. Why would you want to? If they're using Chrome then they made a deliberate choice not to use IE?
-
You cannot "decrypt" the password. Read those other threads.
-
I don't think you'll find much help here if you're looking for a point-and-click way to develop a PHP application. Frankly the idea of developers working that way terrifies me. You're more likely to get help if you can actually work with the PHP code itself. Like, you can post what you have here and we can make suggestions on what to do and you can go into the code and manually make the changes. Yes, but I have no idea what you're trying to actually accomplish. What are these queries supposed to help you do? How would you use them? And I don't know if I want the answer to this, but I'll ask anyways: select text as aboutme from texts where profile_id = 1 and about_me = 11. I assume profile_id=1 means "this table has text for lots of different profiles, and in this case I want the text for profile #1". Is that right? 2. What does the about_me column represent?
-
Yeah, I saw the bit where you said the original wasn't OOP code. But that bit I posted isn't OOP either, so I figured it came from the tutorial and you were only putting stuff into classes. The three problems I saw with it: 1. If $i starts at 0 and only ever increases, $i will always be >=0. The loop cannot possibly end on its own. That's a sign that it's either the wrong structure to use (a while or do/while may be more appropriate, if anything at all) or there is something wrong with the loop as a whole. 2. $id gets its value the exact same way each time through the loop. Nothing changes. You're needlessly recalculating the value over and over again. 3. If $id is null then the loop ends. If $id is not null then the loop begins again at the top (ie, with $i++ then $i>=0 then the $id line). The code after that if block will never execute. More on topic, var_dump($status_replies_); //no output on var_dumpvar_dump() will always produce output. If there is no output then either you aren't seeing it or the code isn't even executing in the first place. (See #3.) And there are other problems. while ($row = $status_replies_) {4. One = is assignment, two ==s is comparison. Unfortunately neither is appropriate here.5. I take it $status_replies_ is supposed to be an array? Then this should probably be a foreach loop instead. while ($row1 = $status2view) { for ($j = 0; $j >= 0; $j++) {Same as before. if ($row1==NULL) { break; }6. $row1 never changes value within the loop. Either this code executes on the first time through or the loop never ends. Unless whatever code comes after the stuff you've posted alters it. Or does some weird stuff where it alters $status2view and then manually (see #1) leaves the for loop. So. What is this tutorial you're working from? I'm worried that you're starting off with bad information.
-
Where is this tutorial you found? Because for ($i= 0; $i >=0 ; $i++) { $id=array_column($status2view ,'update_id'); //gives output on var_dump if ($id==NULL) { break; }else { continue; }is very wrong. For at least three different reasons.
-
Your code is a bit... messed up, with the values. Which is why you're getting something completely different than what you want to get. What is $image_x and _y for? I'm guessing that the thumbnail is supposed to be {$image_x}x{$image_y} in size? But isn't 8x8 tiny for a thumbnail?
-
But didn't you get that ID when you put the image in the folder? What's the rest of your code? Particularly the bits that involve the database.
-
You. Cannot. Return. From. The. Success. Or. Failure. Handlers. It will NOT make the socket_open() function return a value. If you want to log to the console (or do something else) on success or on failure then put that code inside the handlers themselves.
-
So no. But the PHP Installation & Configuration forum sure sounds appropriate.
-
What you need is stopPropagation. It prevents an event from being "bubbled" up to be handled by parent elements. Put a handler on both the body and the weblink/webdropdown elements, have body's work the way it does now, and have the others' merely call stopPropagation on the event object.
-
The ready state changes more than once during the lifetime of the connection. That's why there is a .readyState value you can look at. Only make a decision regarding connected/not connected when readyState is 4, which corresponds to the request having completed.
-
What does the script do? Are there any errors logged? Is cron set up to email you the results?
-
Word wrap isn't against the rules. You just need a really wide monitor and a really high resolution.
-
By the way, the one-liner: $input = "dog,white cat,white cat,black cat,white dog,black bird,white"; $output = current(array_map(function($i){return ksort($i)&&array_walk($i,function(&$v){$v=implode(": ",array_reverse(func_get_args()));})?implode("\n",$i):array();},array(array_map(function($i){return arsort($i)&&array_walk($i,function(&$v){$v=implode(" ",func_get_args());})?implode(", ",$i):array();},array_reduce(preg_split('/\r\n?|\n/',$input),function($c,$i){return@++$c[strtok($i,",")][strtok("")]?$c:$c;},array()))))); echo $output;Obfuscated a bit so it's longer than it needs to be.
-
It's not a super-simple one-liner. You say you have code that isn't working? What is it?
-
gizmola found and fixed a problem with the emailing system, which handles things like notifications, verification emails, and password resets. It'll be chugging through a backlog of emails for a bit so you may receive some emails for stuff that doesn't matter anymore. There was also a problem with the CAPTCHA verification on the registration page that has also been addressed.
-
If you're saying that by moving the PDFs outside the web root then that's not entirely true. What matters is whether Google can find a URL (and it's very good at that*) and whether it can get the contents of the URL. Simply hiding the PDFs behind a PHP script isn't enough - it needs to require authentication too. It'll help you with the good bots, but you won't be protected from the bad bots who don't respect robots.txt. * If you use Google Talk, share a link with someone over it, and they click the link, Google will pick it up. At work, we've had them discover development sites that way - they weren't supposed to be publicly accessible but they were misconfigured. The sites got indexed. After applying a robots.txt to our environments and firewalling the boxes, it took a few weeks for the index to lose the sites.