# Flash chat

**URL:** <https://forum.kirupa.com/t/flash-chat/15710>\
**Category:** Uncategorized\
**Created:** [March 17, 2003, 10:52am UTC](https://forum.kirupa.com/t/flash-chat/15710 "2003-03-17T10:52:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fishtank](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@fishtank](https://forum.kirupa.com/u/fishtank)\
**Post date:** [March 17, 2003, 10:52am UTC](https://forum.kirupa.com/t/flash-chat/15710/1 "2003-03-17T10:52:51Z")

</div>

i ve almost finished my flash chat, i only need one thing:

i have to delet the last letters of a textfile (like to cut off the end), in order to keep the file size small…

has someone a php-script that does that? its very important to me to finish that chat…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 17, 2003, 11:04am UTC](https://forum.kirupa.com/t/flash-chat/15710/2 "2003-03-17T11:04:34Z")

</div>

Howdy…

I don’t know how deleting the last character of the string goes with the Flash chat, but you can use substr() function to do that… Get the whole content of the text file into the variable and apply the substr() function…

Here is the example of how you can do according to the PHP manual…

```php
<?php
     $rest = substr("abcdef", 0, -1); // returns "abcde"
?>

```

Hope this is what you are looking for… 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 17, 2003, 12:52pm UTC](https://forum.kirupa.com/t/flash-chat/15710/3 "2003-03-17T12:52:26Z")

</div>

wh000, thanx, thats it!!! ill finish the chat later, ill post the url…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 17, 2003, 7:46pm UTC](https://forum.kirupa.com/t/flash-chat/15710/4 "2003-03-17T19:46:32Z")

</div>

Thanks… Looking forward to see what you got there… 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 17, 2003, 7:49pm UTC](https://forum.kirupa.com/t/flash-chat/15710/5 "2003-03-17T19:49:54Z")

</div>

it causes a lot of traffic, about 1 meg per 10 minutes, so i do not want to run it on my own server, but in the next few days ill have my own domain and will transfer my site to a professional webhost-company ( www.webserver.at ).

as soon as i got that, ill post it here…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 17, 2003, 8:27pm UTC](https://forum.kirupa.com/t/flash-chat/15710/6 "2003-03-17T20:27:26Z")

</div>

😉
