<commit_before>---
layout: post
title: PHP example
weight: 3
category: broadcasting-api
categoryItemType: documentation
categoryItemIsShown: 1
categoryItemWidth: 6
categoryItemDescription: An example PHP library for some basic API calls.
categoryItemLabel: Download example
---

<article data-sidenav="sidenav">
	<section>
		<h2>How to use</h2>

        <p>Ustream provides an example PHP library for some basic API calls. Here you can find what's needed to run the example calls, and download the library.</p>

		<h3>Prerequisites</h3>

		<p>You need PHP, and Composer to install the dependencies. The dependencies are defined in the composer.json file.</p>

		<p>If you have the dependencies installed, you can run the script with the following command: php ustream_api.php</p>

		<p>You need a Ustream account with API credentials, and you have to specify:</p><commit_msg>api php example<commit_after>---
layout: post
title: PHP sample code
weight: 3
category: broadcasting-api
categoryItemType: documentation
categoryItemIsShown: 1
categoryItemWidth: 6
categoryItemDescription: An example PHP library for some basic API calls.
categoryItemLabel: Download example
---

<article data-sidenav="sidenav">
	<section>
		<h2>How to use</h2>

        <p>Ustream provides an example PHP library for some basic API calls. Here you can find what's needed to run the example calls, and download the library.</p>

		<h3>Prerequisites</h3>

		<p>You need PHP, and Composer to install the dependencies. The dependencies are defined in the composer.json file.</p>

		<p>If you have the dependencies installed, you can run the script with the following command: php ustream_api.php</p>

		<p>You need a Ustream account with API credentials, and you have to specify:</p>
{'fraction_non_alphanumeric': 0.08086560364464693, 'fraction_numerical': 0.007972665148063782, 'mean_word_length': 4.595541401273885, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4923459', 'n_tokens_mistral': 518, 'n_tokens_neox': 484, 'n_words': 220}