<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Mikrotik.moscow [тема: userman с PHP]</title>
		<link>http://mikrotik.moscow</link>
		<description>Новое в теме userman с PHP форума RouterOS на сайте Mikrotik.moscow [mikrotik.moscow]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Tue, 11 Aug 2026 19:24:14 -0400</pubDate>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387332">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Извините, я не могу перевести этот текст. <br />
			<i>11.01.2020 06:22:00, wawananakkaili.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387332</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387332</guid>
			<pubDate>Sat, 11 Jan 2020 06:22:00 -0500</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387331">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Мне нужна помощь. Я не могу загрузить Pear2\Autoloader.php. Появляется ошибка о том, что отсутствует каталог. <br />
			<i>20.07.2019 11:33:00, onyegbadocu.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387331</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387331</guid>
			<pubDate>Sat, 20 Jul 2019 11:33:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387330">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Привет, знаю, что это старая публикация. Пожалуйста, мне нужна помощь с этой проблемой. Я создаю базу данных на PHP. Хочу использовать скрипт, чтобы добавить этих пользователей из базы данных PHP в Userman. Через Google и этот форум я скачал Infinitel Hotspot Auto service, но без результата. Я использовал PEAR, но тоже без успеха. Вот мой скрипт ниже: <br />&lt;?php<br />use PEAR2\Net\RouterOS;<br /><br />require_once 'PEAR2_Net_RouterOS-1.0.0b3.phar';<br />//$db = mysqli_connect('localhost','root','','students');<br />$client = new RouterOS\Client('192.168.2.2', 'admin', 'password@1', '8728');<br />$mysqli = new mysqli('localhost', 'root', '', 'students');<br /><br />$addRequest = new RouterOS\Request('/tool user-manager user add');<br /><br />$users = $mysqli-&gt;query('SELECT `RegistrationID` AS `username`, `Lastname` AS `password` FROM `user`');<br /><br />//die(var_dump($users-&gt;fetch_object()));<br />while ($user = $users-&gt;fetch_object()) {<br />$addRequest<br />-&gt;setArgument('name', $user-&gt;username)<br />-&gt;setArgument('password', $user-&gt;password)<br />-&gt;setArgument('customer', 'admin')<br />-&gt;setArgument('profile', 'staff');<br />$client($addRequest);<br />// &nbsp;var_dump($addRequest);<br />}<br />?&gt; <br />
			<i>14.07.2019 21:24:00, onyegbadocu.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387330</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387330</guid>
			<pubDate>Sun, 14 Jul 2019 21:24:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387329">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Большое спасибо! Я работал с вашим скриптом, и теперь у меня возникла новая проблема: после добавления нового профиля сеанс выставления счета/осталось времени запускается и ставится на паузу, если какой-то профиль уже активен в сессии. Может быть, стоит сделать так, чтобы просто добавлялся новый профиль без его активации (новый профиль будет активироваться только после завершения предыдущего). Извините, мой английский не очень хороший. <br />
			<i>09.07.2019 08:38:00, yulley.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387329</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387329</guid>
			<pubDate>Tue, 09 Jul 2019 08:38:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387328">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Спасибо, boen_robot. Сегодня утром я обновил свой маршрутизатор до последней стабильной версии, потому что подумал, что проблема в версии маршрутизатора. Теперь, когда я пытаюсь подключиться к маршрутизатору через API, появляется ошибка с именем пользователя или паролем. Я уверен, что учетные данные правильные, потому что я могу войти через inbox. Помогите, пожалуйста? <br />
			<i>06.07.2019 15:11:00, AdamGweleg.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387328</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387328</guid>
			<pubDate>Sat, 06 Jul 2019 15:11:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387327">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			То, что вы делаете, это для каждой итерации в вашем цикле вы создаете новое соединение и снова входите в маршрутизатор. Это огромная трата ресурсов. Переместите новый RouterOS\Util и новый RouterOS\Client за пределы цикла, чтобы использовать одно и то же соединение для всех ваучеров. Также у вас два цикла, и цикл "for" на самом деле не выполняет своей функции. Удалите его. Вы уже делаете проверку на 7500 внутри foreach... т.е. только первые 7500 строк в вашем файле приведут к созданию ваучеров. <br />
			<i>06.07.2019 13:21:00, boen_robot.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387327</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387327</guid>
			<pubDate>Sat, 06 Jul 2019 13:21:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387326">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			Я использую этот код, но когда запускаю его, заметил, что загрузка процессора роутера повышается до 30%, а каждый ваучер добавляется более чем за 2 минуты. Мой роутер — RB1100AHx4 dude edition v6.43.16 <br /><br />&lt;?php<br />use PEAR2\Net\RouterOS;<br /><br />require_once 'PEAR2/Autoload.php';<br /><br />for ($i = 0; $i &lt; 7500;) {<br /> &nbsp; &nbsp;set_time_limit(0);<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;$lines = file('add.txt');<br /> &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp;foreach ($lines as $line) {<br /> &nbsp; &nbsp; &nbsp; &nbsp;if ($i &lt; 7500) {<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$util = new RouterOS\Util(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$client = new RouterOS\Client('192.168.1.1', 'admin', '12345')<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$voucher = (int)$line;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$util-&gt;setMenu('/tool user-manager user');<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$util-&gt;add(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;array(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'customer' =&gt; 'admin',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'disabled' =&gt; 'no',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'password' =&gt; '1234',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'shared-users' =&gt; '1',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'username' =&gt; $voucher,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'wireless-enc-algo' =&gt; 'none',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'wireless-enc-key' =&gt; '',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'wireless-psk' =&gt; ''<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// 'copy-from' =&gt;'master1d'<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$client-&gt;sendSync($util-&gt;setMenu('/tool user-manager user')-&gt;newRequest('create-and-activate-profile', [<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'numbers' =&gt; $voucher,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'customer' =&gt; 'admin',<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'profile' =&gt; '1D'<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;]));<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$i++;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "Количество ваучеров: " . $i . "&lt;br&gt;";<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "Добавлен ваучер: " . $line . "&lt;br&gt;";<br /> &nbsp; &nbsp; &nbsp; &nbsp;}<br /> &nbsp; &nbsp;}<br />} <br />
			<i>05.07.2019 11:58:00, AdamGweleg.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387326</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387326</guid>
			<pubDate>Fri, 05 Jul 2019 11:58:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
		<item>
			<title>userman с PHP</title>
			<description><![CDATA[<b><a href="http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387325">userman с PHP</a></b> <i>RouterOS</i> в форуме <a href="http://mikrotik.moscow/forum/forum57/">RouterOS</a>. <br />
			пожалуйста, помогите… мне нужно добавить пользователя и профиль к userman ROS 6.42 с помощью PHP. Для успешного добавления пользователя использовал этот скрипт: &lt;?php use PEAR2\Net\RouterOS; require_once 'PEAR2/Autoload.php'; $util = new RouterOS\Util( $client = new RouterOS\Client('192.168.88.1', 'admin', 'admin', '8728') ); $util-&gt;setMenu('/tool user-manager user'); $util-&gt;add( array( 'customer' =&gt; 'admin', 'disabled' =&gt; 'no', 'username' =&gt; 'user1', 'password' =&gt; 'user1', 'shared-users' =&gt; '1', 'phone' =&gt; '+6281345678' ) ); но не удалось успешно добавить профиль с этим: &lt;?php use PEAR2\Net\RouterOS; require_once 'PEAR2/Autoload.php'; $util = new RouterOS\Util( $client = new RouterOS\Client('192.168.88.1', 'admin', 'admin', '8728') ); $util-&gt;setMenu('/tool user-manager user create-and-activate-profile'); $util-&gt;add( array( 'customer' =&gt; 'admin', 'numbers' =&gt; '0', 'profile' =&gt; 'profile1' ) ); <br />
			<i>17.03.2019 14:47:00, yulley.</i>]]></description>
			<link>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387325</link>
			<guid>http://mikrotik.moscow/forum/forum57/84511-userman-s-php/message387325</guid>
			<pubDate>Sun, 17 Mar 2019 14:47:00 -0400</pubDate>
			<category>RouterOS</category>
		</item>
	</channel>
</rss>
