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! :P
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
  1. lines:
  2. start php
  3. set the filename and path to use
  4. get the filesize of the file
  5. blank
  6. tell the browser the datastream is an octet-stream (8-bit data)
  7. tell the browser how many bytes it is
  8. tell the browser it's for saving as a file, and the filename to use by default
  9. tell the browser it's a binary transfer
  10. open the file
  11. toss the file at the browser
  12. 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:
  1. lines:
  2. start php
  3. set the filename and path to use
  4. get the filesize of the file
  5. blank
  6. tell the browser the datastream is an octet-stream (8-bit data)
  7. tell the browser how many bytes it is
  8. tell the browser it's for saving as a file, and the filename to use by default
  9. tell the browser it's a binary transfer
  10. open the file
  11. toss the file at the browser
  12. 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