Page 1 of 1
script display
Posted: Thu Sep 02, 2004 12:55 am
by Lynxx
I found something i liked and tried to get the guy to explain it to me but i dont understand the explination so i am asking if someone can help me get it to work here as he speaks german and i do not.
It is a cool code can be found in action here:
http://sourceshock.com/details_snippet.php?id=27
he tried to explain it here:
http://www.sourceshock.com/forum/topic. ... id=1&hid=1
thanks in advance!

i know its simple im just new and not sure which var should contain the code i am trying to display
Posted: Thu Sep 02, 2004 1:10 am
by feyd
- lines:
- start php
- set the filename and path to use
- get the filesize of the file
- blank
- tell the browser the datastream is an octet-stream (8-bit data)
- tell the browser how many bytes it is
- tell the browser it's for saving as a file, and the filename to use by default
- tell the browser it's a binary transfer
- open the file
- toss the file at the browser
- I don't see any code after this..
Posted: Thu Sep 02, 2004 3:51 am
by timvw
[php_man]highlight-string[/php_man]
I thought this forum had also those cute
Code: Select all
tags, so i wanted those in my phpBB based cms too... As i used [url]http://pear.php.net[/url] HTML_BBCodeParser, i wrote a little plugin for it: [url]http://home.mysth.be/~timvw/programming/php/PHPsource.txt[/url]
Posted: Thu Sep 02, 2004 6:22 am
by Lynxx
feyd wrote:- lines:
- start php
- set the filename and path to use
- get the filesize of the file
- blank
- tell the browser the datastream is an octet-stream (8-bit data)
- tell the browser how many bytes it is
- tell the browser it's for saving as a file, and the filename to use by default
- tell the browser it's a binary transfer
- open the file
- toss the file at the browser
- I don't see any code after this..
if you got that from the first link thats just an example of the script in action the code its displaying is a force downloader he shows the code for it in the second link
Posted: Thu Sep 02, 2004 9:56 am
by feyd
yeah.. the second link is just a highlight_string tool. Much like our
Code: Select all
tags.
Hopefully, I can get around to updating it soon and post the code snippets.. maybe a tutorial.. I dunno on that front.
Posted: Thu Sep 02, 2004 4:14 pm
by Lynxx
yea thats all i am really looking for to display some c scripts on a webpage
i generally understand what the scripts are doing i just dont understand where in any of the highlight codes does it let you input the code you want it to display