 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
|
 |
|
 |
04-28-2008, 06:45 AM
|
#21 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Search the web for GD library. And uh, why start a silent command (@imagecreatetruecolor) and then call up the or die ("..") function...? Couldn't you then just better $im = @imagecreatetruecolor(...); if (!$im) { exit('DieCommand'); }
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
04-28-2008, 10:54 AM
|
#22 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
|
PHP Code:
die(chr(0x54) . chr(0x61) . chr(0x6C) . chr(0x6B) . chr(0x70) . chr(0x68) . chr(0x70));
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 05-27-2008 at 07:37 PM.
|
|
|
|
05-22-2008, 01:41 PM
|
#23 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Location: Denmark
Posts: 353
Thanks: 8
|
HTML Code:
<p>Hello TalkPHP!</p>
=P
__________________
|
|
|
05-22-2008, 06:28 PM
|
#24 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
*sigh* ...
Didn't see this one yet.
PHP Code:
die('Bye Bye TalkPHP');
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
05-22-2008, 07:42 PM
|
#25 (permalink)
|
|
The Prestige
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 852
Thanks: 31
|
You beat yourself to it by using exit() earlier, but this person also did. ;)
Outputting data without print/echo
|
|
|
|
05-23-2008, 10:31 AM
|
#26 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Location: Denmark
Posts: 353
Thanks: 8
|
As in response to ReSpawN's exit() code:
You can't use exit()'s parameter to specify a shutdown message, thats why we have die(). exit()'s parameter is an integer that tells the shutdown code.
exit(0); means that the program shutdown correct just like in C++:
Code:
int main()
{
return 0;
}

__________________
|
|
|
05-23-2008, 11:39 AM
|
#27 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,239
Thanks: 3
|
exit can take a string argument (in place of the usual integer). If the argument is a string, it gets printed just before exiting just like with die. Try it. 
__________________
salathe@php.net
|
|
|
|
05-23-2008, 12:53 PM
|
#28 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
|
Hai
Can Has Stdio?
Visible "hai Talkphp"
Kthxbye
__________________
Nunchaku! Who doesn't like martial arts? =)
|
|
|
06-12-2008, 08:27 PM
|
#29 (permalink)
|
|
The Wanderer
Join Date: Jun 2008
Posts: 8
Thanks: 1
|
By typing it...
Never said it had to be in PHP. XD
|
|
|
|
06-25-2008, 03:18 PM
|
#30 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,216
Thanks: 17
|
PHP Code:
$im = @imagecreatefromJPEG("bg.jpg"); $black = imagecolorallocate($im, 0, 0, 0); imagestring($im, 3, 5, 2, "Hello TalkPHP", $black); header("content-type: image/jpeg"); echo imagejpeg($im); imagedestroy($im);
|
|
|
|
07-27-2008, 04:11 PM
|
#31 (permalink)
|
|
The Wanderer
Join Date: Jul 2008
Posts: 6
Thanks: 1
|
Quote:
Originally Posted by Jim
Hai
Can Has Stdio?
Visible "hai Talkphp"
Kthxbye
|
xD lolcode. :P
Mah way of outputting data without using echo/print:
PHP Code:
<?php system("echo wut"); ?>
...hey i didn't use php's echo. :(
|
|
|
|
08-22-2008, 06:40 AM
|
#32 (permalink)
|
|
The Wanderer
Join Date: Aug 2008
Location: italy
Posts: 7
Thanks: 0
|
PHP Code:
<?php $a = array("TalkPHP Rulez\n"); print_r($a); ?>
or with a system and without any echo or print
PHP Code:
<?php system("perl -e 'printf `hi TalkPHP\n`'"); ?>
(lol)
|
|
|
08-23-2008, 12:25 AM
|
#33 (permalink)
|
|
The Contributor
Join Date: Sep 2007
Posts: 29
Thanks: 8
|
Code:
document.write('O HAI');
|
|
|
|
08-23-2008, 08:03 AM
|
#34 (permalink)
|
|
The Visitor
Join Date: Aug 2008
Posts: 1
Thanks: 0
|
The same, but different
<?=`echo Hello_World`?>
|
|
|
|
08-26-2008, 08:32 AM
|
#35 (permalink)
|
|
The Visitor
Join Date: Aug 2008
Posts: 3
Thanks: 0
|
Use a java bridge!
Code:
// action handler to fill button
function clicked($sender, $e) {
$win = new Mono("Gtk.Window", "phpinfo()");
$win->set_DefaultWidth(640);
$win->set_DefaultHeight(400);
$pane = new Mono("Gtk.ScrolledWindow");
$view = new Mono("Gtk.TextView");
$buffer = new Mono("Gtk.TextBuffer", new Mono("Gtk.TextTagTable"));
ob_start();
phpinfo();
$buffer->set_Text(ob_get_contents());
ob_end_clean();
$view->set_Buffer($buffer);
$pane->add($view);
$win->add($pane);
$win->ShowAll();
}
$btn = new Mono("Gtk.Button", "Show output from phpinfo()");
$btn->add_Clicked(new Mono(
"System.EventHandler",
mono_closure($this, "clicked")));
// then send button to window.
|
|
|
|
09-02-2008, 06:04 PM
|
#36 (permalink)
|
|
The Wanderer
Join Date: Sep 2008
Posts: 6
Thanks: 1
|
Howzabout some Error Tossing
PHP Code:
<? ini_set('display_errors','on'); error_reporting(E_ALL); trigger_error('Woah, error d00d',E_USER_NOTICE); ?>
What? It works. You can even execute stuff after it too 
Last edited by zspencer : 09-02-2008 at 06:04 PM.
Reason: %s/cen/can/ig
|
|
|
|
09-02-2008, 08:16 PM
|
#37 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
|
PHP Code:
file_put_contents('error.html', '<p>error\'d</p>');
$ch = curl_init('error.html'); // explanatory line curl_setopt($ch, CURLOPT_RETURN_TRANSFER, false); curl_exec($ch);
|
|
|
|
09-10-2008, 03:14 AM
|
#38 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,216
Thanks: 17
|
C++
Code:
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
fstream file_op("test.txt",ios::out);
file_op<<"Hello World";
file_op.close();
system("test.txt");
return 0;
}
Only tested on windows XP, but should run cross platform.
|
|
|
|
09-10-2008, 10:52 AM
|
#39 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
|
I can confirm it compiles on linux, although you may need to change the line:
to something like
cpp Code:
system("cat test.txt");//cat vi nano whatever
so linux knows what to do with it.
in a similar vein, heres ruby:
ruby Code:
File.open('test.txt', 'w') {|f| f.write("Hello World \n\r") } exec("cat test.txt")
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 09-10-2008 at 11:13 AM.
|
|
|
|
12-02-2008, 08:59 PM
|
#40 (permalink)
|
|
The Visitor
Join Date: Sep 2007
Posts: 3
Thanks: 0
|
how about breaking out of php and just getting the html to output?
PHP Code:
?>text to this page<?
no echo's or print's involved
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|