# Get connectioncounts with PHP

**URL:** <https://community.wowza.com/t/get-connectioncounts-with-php/38414>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [September 13, 2012, 6:58am UTC](https://community.wowza.com/t/get-connectioncounts-with-php/38414 "2012-09-13T06:58:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Davis](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Chris\_Davis](https://community.wowza.com/u/Chris_Davis)\
**Post date:** [September 13, 2012, 6:58am UTC](https://community.wowza.com/t/get-connectioncounts-with-php/38414/1 "2012-09-13T06:58:58Z")

</div>

Hello,

i have a problem with the Authorization for admin pages (/connectionscount, /serverinfo, etc.) in PHP and/or with standard curl in linux…

when i do:

```auto
curl -v "http://MyUser:MyPass@MyIP:8086/connectioncounts"

```

or

```auto
curl -v -u "MyUser:MyPass" "http://MyIP:8086/connectioncounts"

```

i just get ths back:

```auto
* About to connect() to MyIP port 8086 (#0)
* Trying MyIP... connected
* Connected to MyIP (MyIP) port 8086 (#0)
* Server auth using Basic with user 'admin'
> GET /connectioncounts HTTP/1.1
> Authorization: Basic YWRtaW46a2lsbG9w
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: MyIP:8086
> Accept: */*
> 
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="Wowza Media Systems", nonce="9bef1d28eebf8d1378824e65872XXXX", algorithm=MD5, qop="auth"
< Content-Type: text/html
< Connection: Keep-Alive
< Server: FlashCom/3.5.2
< Cache-Control: no-cache
< Content-Length: 0
< 
* Connection #0 to host MyIP left intact
* Closing connection #0

```

Its strange, username and password ist 100% OK, have tested it 100 times at browser… what im doing wrong that curl and php (file\_get\_contents/curl and fsockopen) can not auth in there?

Thanks

Best regards,

Chris

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 13, 2012, 3:27pm UTC](https://community.wowza.com/t/get-connectioncounts-with-php/38414/2 "2012-09-13T15:27:24Z")

</div>

You probably need to change the AuthenticationMethod of the HTTPProvider in /conf/VHost.xml from “admin-digest” to “admin-basic”

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 13, 2012, 4:25pm UTC](https://community.wowza.com/t/get-connectioncounts-with-php/38414/3 "2012-09-13T16:25:09Z")

</div>

Cool, welcome, thanks for update.

Richard

---

<div class="post-metadata">

**Author:** ![Chris\_Davis](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Chris\_Davis](https://community.wowza.com/u/Chris_Davis)\
**Post date:** [September 13, 2012, 8:18am UTC](https://community.wowza.com/t/get-connectioncounts-with-php/38414/4 "2012-09-13T08:18:02Z")

</div>

Thank You Richard, again 🙂

It works!

Best regards,

Chris
