# Search:

Type: Posts; User: hyperlisk

Page 1 of 13 1

1. ## Thread: PHP Golf: Fibonacci Sequence

by hyperlisk
Replies
8
Views
2,615

### Heh, completely forgot about that. That's got to...

Heh, completely forgot about that. That's got to be the best possible :P
2. ## Thread: PHP Golf: Fibonacci Sequence

by hyperlisk
Replies
8
Views
2,615

### Alright, for a finite length of 20, my concept is...

Alright, for a finite length of 20, my concept is still the same, this one is 70 bytes.

<?php
\$b=0;for(\$a=\$b++,\$c=-20;\$c;list(\$a,\$b)=array(\$b,\$a+\$b),\$c++)echo"\$a\n"
?>

EDIT:
3. ## Thread: PHP Golf: Fibonacci Sequence

by hyperlisk
Replies
8
Views
2,615

### Good thing there aren't any prizes :P

Good thing there aren't any prizes :P
4. ## Thread: PHP Golf: Fibonacci Sequence

by hyperlisk
Replies
8
Views
2,615

### That doesn't start at 0 though :P Here's a...

That doesn't start at 0 though :P Here's a shorter one though :P

<?php
\$b=0;for(\$a=\$b++;;list(\$a,\$b)=array(\$b,\$a+\$b))echo"\$a\n"
?>
5. ## Thread: PHP Golf: Fibonacci Sequence

by hyperlisk
Replies
8
Views
2,615

### PHP Golf: Fibonacci Sequence

I'm currently bored, so I just wanna see what you guys can do :P

The challenge is to write the smallest possible code (In bytes) for the given problem.

The problem in this case being printing...
6. ## Thread: How to? getElementByClass?

by hyperlisk
Replies
39
Views
16,756

### This is the best conversation I've seen on here...

This is the best conversation I've seen on here in a long time...

/me wanders off now
7. ## Thread: [RESOLVED] PHP/MySQL User Authentication Security Problem

by hyperlisk
Replies
6
Views
1,132

### Heheh, that works too, :P As the saying goes,...

Heheh, that works too, :P As the saying goes, there's more than one way to skin a cat.

But if you ever need help, you can get me on MSN lol.
8. ## Thread: [RESOLVED] PHP/MySQL User Authentication Security Problem

by hyperlisk
Replies
6
Views
1,132

### OMG HEN! What's up! Zeeblo forever~ Catch me on...

OMG HEN! What's up! Zeeblo forever~ Catch me on MSN if you still need help.

Also, don't be scared to ask questions here, people always do :P

Anyways, what you should do is store the session id...
9. ## Thread: PHP email script, how to secure or validate?

by hyperlisk
Replies
4
Views
1,164

### Might want to check this function out. It...

Might want to check this function out. It protects against email injection and validates it too:
http://shaunwagner.com/user_files/php/as_mail.txt
10. ## Thread: How do I do this (index.php?page=)

by hyperlisk
Replies
15
Views
4,095

### Or you can just do this so that it doesn't...

Or you can just do this so that it doesn't discriminate against any filenames :P

<?php

function cleanQuery(\$page){
\$page = basename(\$page);
if(!file_exists('./content/'.\$page.'.php')){...

by hyperlisk
Replies
7
Views
6,734

### Here's a nice set of functions I use, I don't...

Here's a nice set of functions I use, I don't remember who made them though...

<?php
function ConvertBMP2GD(\$src, \$dest = false) {
if (!(\$src_f = fopen(\$src, "rb"))) {
...

by hyperlisk
Replies
1
Views
945

Try this:

13. ## Thread: Trying to make a string randomization script

by hyperlisk
Replies
4
Views
820

### Or a slightly smaller one for phrases :P ...

Or a slightly smaller one for phrases :P

function anagram(f){
for(y in (x=f.tIN.value.split(' ')))
x[y]=(x[y].split('').sort((function(){return...
14. ## Thread: escape double quotes

by hyperlisk
Replies
4
Views
2,045

### It works for me... =/

It works for me... =/
15. ## Thread: escape double quotes

by hyperlisk
Replies
4
Views
2,045

### You didnt' add the second slash: function...

You didnt' add the second slash:

str=str.replace(/\'/g,"\\'");
str=str.replace(/"/g,'\\"');
str=str.replace(/\\/g,'\\');
str=str.replace(/\0/g,'\\0');...
16. ## Thread: My Goal: A Site in Under 10KiB

by hyperlisk
Replies
6
Views
1,370

### My Goal: A Site in Under 10KiB

Hey, I just coded this today, just wondering what you guys think. My goal was to code a site in under 10KiB (10,240 bytes, including images) and this is exactly at the limit. It was over, but I just...
17. ## Thread: Free Code = Laziness!!!

by hyperlisk
Replies
45
Views
6,353

### Just to throw in my two cents, I don't like...

Just to throw in my two cents, I don't like people that throw in a 'thanks in advance.' Generally, if I see that, I just hit the back button.

by hyperlisk
Replies
1
Views
702

### All you have to do is call require with a...

All you have to do is call require with a preceding slash:

require "/file/from/root"
19. ## Thread: Problem with regular expressions when word not first on line

by hyperlisk
Replies
15
Views
2,091

### Try adding the 'm' parameter to the regular...

Try adding the 'm' parameter to the regular expression. 'm' makes the regular expression match across multiple lines:

\$fString =...

by hyperlisk
Replies
5
Views
723

### 'i' tells the reular expression to make the match...

'i' tells the reular expression to make the match case-insensitive (Not really needed here, but I'm just so used to putting it :P)

'm' tells the regular expression to match across multiple lines.
21. ## Thread: Basic Form Processor for Windows Server

by hyperlisk
Replies
3
Views
682

### '/' still comes up as a drectory under Windows as...

'/' still comes up as a drectory under Windows as well. And for the solution you posted, you can just use the constant DIRECTORY_SEPARATOR. However, using a foward-slash with PHP running in Windows...

by hyperlisk
Replies
5
Views
723

### I think he wants PHP, not JavaScript :P ...

I think he wants PHP, not JavaScript :P

<?php

// \$text is all of that text that you want to get the lines from.
preg_match_all('/^#[^\n\r]*/im',\$text,\$matches);
\$matches = \$matches[0];...
23. ## Thread: [script] Simple PHP Compressor

by hyperlisk
Replies
0
Views
4,774

### [script] Simple PHP Compressor

Not sure if this is the right forum for this, but meh, move it if you must :P

Here's just a simple script for compressing files. It was made on Windows, which is why no attempt to CHMOD a file is...
24. ## Thread: Homebrew Forum Software?

by hyperlisk
Replies
5
Views
825

### Unless you look at IPB :P And as for...

Unless you look at IPB :P

And as for challenges, I would just say handling user input is the main challenge.
25. ## Thread: Stacks > Recursion

by hyperlisk
Replies
0
Views
579

### Stacks > Recursion

Hmm... I'm bored, so... yeah...

Well, I don't like recursion, because it sucks, so I use stacks. Stacks are basically just arrays... You add things to the stack and take them off in the order that...
Results 1 to 25 of 309
Page 1 of 13 1