1
2
3
4
// untested, and my PHP is verrry rusty...

class CCAction
...

PHP On Universal File Download Class

by bartz, January 13, 2009 16:49

I'd refactor all the "actio...

9d4b720deb717771cd0116d21f7a36cd Talk
1
2
3
4
<?php
function parse_accept_headers($default = 'html')
{
...

PHP On Parse HTTP Accept headers

by Adam, January 09, 2009 22:27

To answer your question abo...

A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
<?php
       class my_class {
           private $someVariable;
...

PHP On Base class for easy class p...

by theman, January 09, 2009 20:59 Star_fullStar_fullStar_fullStar_full

you guys are nubs

40ae6a389169b134c62fc18970be740c Talk

PHP On Bad readability in Routing ...

by Ollie , January 09, 2009 20:58

Good, I'm glad it helped. M...

Be072eb0e9f6f81c20541150cabce3ab Talk

PHP On Bad readability in Routing ...

by bwaidelich, January 09, 2009 17:12

Hi Ollie and thanks a lot f...

D62b047db8637387d58c603647becdee Talk
1
2
3
4
function parse_accept_headers($default = 'html'){
  $formats = array(
    'text/html' => 'html',
...

PHP On Parse HTTP Accept headers

by fain182.myopenid.com, January 09, 2009 16:40 Star_fullStar_fullStar_fullStar_full

slightly improved..

1bf59120892e34eb60836725566c6e55 Talk
1
2
3
4
<?php   
  $link=mysql_connect("localhost","root","12345678") or die(mysql_error());
  
...

PHP On Output div block with PHP c...

by Habibur Rahman, December 28, 2008 14:35

I’m novice programmer. In f...

944c3fe0a9318990b75a3fb62d126e42 Talk
1
2
3
4
<?php
foreach ($this->uriPatternSegments as $uriPatternSegment) {
  foreach ($uriPatternSegment as $routePart) {
...

PHP On Bad readability in Routing ...

by Ollie , December 23, 2008 06:19 Star_fullStar_fullStar_fullStar_full

Thanks for posting bwaideli...

Be072eb0e9f6f81c20541150cabce3ab Talk

PHP On check for valid url

by Tj Holowaychuk, December 22, 2008 02:24

In the right context yes......

F1e3ab214a976a39cfd713bc93deb10f Talk

PHP On check for valid url

by Ollie , December 22, 2008 02:15

There's nothing Nazi about ...

Be072eb0e9f6f81c20541150cabce3ab Talk
1
2
3
4
<?php
function randomPassword($length) {
    $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!@#$%^&*(){}[]|~';
...

PHP On Random password

by Just Another Programmer, December 19, 2008 05:10

This one uses special chara...

Fb222af1d07ca695061df966b1286164 Talk
1
2
3
4
<?php
class PropertyHandler
{
...

PHP On Base class for easy class p...

by auxide, December 19, 2008 04:39 Star_full

Dont know how quick this is...

95a865245ca8347f4c80828ef9bb465b Talk
1
2
3
4
<?php
function remove_http($url)
{
...

PHP On remove http from url string

by smithveg-backpack, December 18, 2008 09:51

Code above pretty easy. And...

A2c83e34935b70f9b8111f41dce6880b Talk
1
2
3
4
<?php
function is_valid_uri($uri) {
	return preg_match('~^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?~', $uri);
...

PHP On check for valid url

by Tj Holowaychuk, December 16, 2008 21:34 Star_fullStar_fullStar_full

Not a huge fan of prefixing...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
<?php
function isValidURI( $sURI ){
	//--> Complies with RFC2396
...

PHP On check for valid url

by Tj Holowaychuk, December 16, 2008 21:33 Star_fullStar_fullStar_full

the int returned reflects t...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
<?php
function isValidURI( $sURI ){
	//--> Complies with RFC2396
...

PHP On check for valid url

by fain182.myopenid.com, December 16, 2008 11:12 Star_fullStar_fullStar_full

more expressive IMHO

1bf59120892e34eb60836725566c6e55 Talk
1
2
3
4
<?php
function isValidURI( $sURI ){
	//--> Complies with RFC2396
...

PHP On check for valid url

by adsterling.myopenid.com, December 15, 2008 20:03 Star_fullStar_fullStar_fullStar_full

RFC2396 Compliant.
See:- ht...

Avatar Talk
1
2
3
4
<?php
ob_start();
include_once "include/config.php";
...

PHP On Login / Registration - be e...

by Eineki, December 13, 2008 15:57

I don't think you can simpl...

5a00a3a98dcf6f9cd717440fd2b606e5 Talk
1
2
3
4
function main()
 {
  do
...

PHP On Socket Loop, Need Constant ...

by EllisGL, December 10, 2008 17:40

Actually you can use a do{}...

8bba46dba9043c254e6eef1aa664e6f0 Talk
1
2
3
4
<?php
/*
E.g:
...

PHP On remove http from url string

by fain182.myopenid.com, November 17, 2008 19:42 Star_fullStar_fullStar_fullStar_full

this would solve the proble...

1bf59120892e34eb60836725566c6e55 Talk

PHP On remove http from url string

by Manoel b h Carvalho, November 17, 2008 18:42

Should be faster, but if pa...

710a543a34a181d528dab05d4550dfed Talk

PHP On file upload validation

by sdfsd, November 17, 2008 08:39

ddffd

Avatar Talk

PHP On remove http from url string

by Chris Dean, November 15, 2008 23:09 Star_fullStar_fullStar_full

I'd go with fain182's solut...

151e36cc7f789a4790c8ca437e3a1f60 Talk

PHP On Base class for easy class p...

by fain182.myopenid.com, November 13, 2008 11:16

it isn't better to use __ge...

1bf59120892e34eb60836725566c6e55 Talk
1
2
3
4
<?php
/*
E.g:
...

PHP On remove http from url string

by fain182.myopenid.com, November 13, 2008 11:06 Star_fullStar_fullStar_fullStar_full

this should be faster

1bf59120892e34eb60836725566c6e55 Talk