Hier heb je echt absoluut geen drol aan, maar vond het wel ff leuk :)
Je kan een heel php script schrijven (ben nog niks tegengekomen waar het niet kan) zonder een enkele ; te gebruiken... Niet door steeds PHP tags te openen en sluiten, maar door alles in if()s te gooien :)
Voorbeeldje

<?php

if( require_once( 'http.inc' ) ){}

if( $fields = array(
	'user'			=> 'GuinuX',
	'password'		=> 'mypass',
	'lang'			=> 'US',
) ){}

if( $files = array() ){}
if( $files[] = 	array(
	'name'			=> 'myfile1',
	'content-type'	=> 'text/plain',
	'filename'		=> 'test1.txt',
	'data'			=> 'Hello from File 1 !!!',
) ){}

if( $files[] = 	array(
	'name'			=> 'myfile2',
	'content-type'	=> 'text/plain',
	'filename'		=> 'test2.txt',
	'data'			=> "bla bla bla\nbla bla",
) ){}

if( $http_client = new http( HTTP_V11, false ) ){}
if( $http_client->host = 'www.jouwmoeder.nl' ){}
if( $status=$http_client->multipart_post( '/external_socket.php', $fields, $files ) ){}

if( header("content-type: text/plain") ){}
if( print($http_client->get_response_body()) ){}

?>


Zoals ik al zei, je hebt er geen fck aan, maar het is wel lache :D
mzl
LOL :D

Dit kan ook:
<?php
error_reporting(E_ALL);

$string = 'fdsf';
'fsdfsd';
'fsdfsd';
'fsdfsd';
'fsdfsd';

?>
Zo kan het natuurlijk ook:


<?php

require_once( 'http.inc' )

?><?php

$fields = array(
	'user'			=> 'GuinuX',
	'password'		=> 'mypass',
	'lang'			=> 'US',
)

?><?php

$files = array()

?><?php

$files[] = 	array(
	'name'			=> 'myfile1',
	'content-type'	=> 'text/plain',
	'filename'		=> 'test1.txt',
	'data'			=> 'Hello from File 1 !!!',
)

?><?php

$files[] = 	array(
	'name'			=> 'myfile2',
	'content-type'	=> 'text/plain',
	'filename'		=> 'test2.txt',
	'data'			=> "bla bla bla\nbla bla",
)

?><?php

$http_client = new http( HTTP_V11, false )

?><?php

$http_client->host = 'www.jouwmoeder.nl'

?><?php

$status=$http_client->multipart_post( '/external_socket.php', $fields, $files )

?><?php

header("content-type: text/plain")

?><?php

print($http_client->get_response_body())

?>
Maar is je ; knop stuk dan :D

Reageren