简体   繁体   中英

php - echo ascii characters?

I have a string of ascii characters, but I'd like to know how to echo that as shown on this site for example:

http://binsearch.info/viewNFO.php?oid=50662038&server=

I can convert it to png using some library I found but I can't figure out what header to use to echo it like that.

It's html, with the ASCII escaped using <pre>...</pre> . You can also just deliver the raw text using Content-Type: text/plain , but then you'd lose control over font-size, etc.

What you're looking for is "ascii art". Googling for text to ascii art in php will help. Also, there's a very similar question right here on SO that recommends using figlet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM