# Get data from php to flash

**URL:** <https://forum.kirupa.com/t/get-data-from-php-to-flash/176350>\
**Category:** flash\
**Created:** [January 23, 2006, 8:52am UTC](https://forum.kirupa.com/t/get-data-from-php-to-flash/176350 "2006-01-23T08:52:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cakeman](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@Cakeman](https://forum.kirupa.com/u/Cakeman)\
**Post date:** [January 23, 2006, 8:52am UTC](https://forum.kirupa.com/t/get-data-from-php-to-flash/176350/1 "2006-01-23T08:52:03Z")

</div>

Hi this should be easy for some of you!

I count words i php and want to use that number I get from the counting in to flash. I get the number but with some more chars…

```php
<?php
$f = file_get_contents('http://www.mydomain.com/file.xml');
$antal = substr_count($f, "<title>");
echo $antal;
?>

```

```auto
t = new LoadVars();
t.load("http://www.mydomain.com/counter.php");
t.onLoad = function (success) {
if (success) {
         trace(t);
    }
};

```

The trace comes out like this:

\*\* 15=&onLoad=%5Btype%20Function%5D\*\*

“15” is correct but how do i get rid of ther other chars? I just want to have the number “15”.

Please help!
