Merge pull request #83 from jonnywilliamson/master

New event system
Update whatsprot.class.php

Correction PHP Fatal error:  Call to a member function getAttribute() on a non-object
Merge pull request #87 from Amirjan/patch-13

Fatal Error Fix
Detect Connection Abort or Disconnect

In PHP's fsockopen there is no direct way to detect the cause of disconnection.
The problem is that the script will keep up and running EVEN IF YOU UNPLUGGED YOUR NETWORK!
This condition will check if there is still connectivity to the server before attempting to read any data.
Update AllEvents.php

Add new useful params to onGroupisCreated
Update whatsprot.class.php

Add new useful params to onGroupisCreated
Merge pull request #88 from Amirjan/master

Add new useful parameters to GroupisCreated
Update whatsprot.class.php
More precise duration for audio

More precise duration for audio is using 'seconds' rather than 'duration' for audio.
But value for duration and seconds in video are same.

rx  <message from="64675643077300-1407855840@g.us" id="1414990734-5" participant="64675643077300@s.whatsapp.net" offline="0" type="media" t="1414991768" notify="Ardian">
rx    <media type="audio" encoding="raw" url="https://mmv24.whatsapp.net/d/n7RoNgPmiLj0YbxNAgBP1RXD5gABQbtcblmgQ/AhLgfvThafZBJVDQPTQYWSReQz54nw1jwDnrGKqERj0y.mp3" file="AhLgfvThafZBJVDQPTQYWSReQz54nw1jwDnrGKqERj0y.mp3" size="3846158" seconds="954" ip="19.1.212.5" mimetype="audio/mpeg" filehash="1c/Lr6XvllWlh5scD2cNHlWXL4vTRk3HdyCxRbDwBFA=" duration="962" acodec="mp3" asampfreq="22050" asampfmt="s16" abitrate="32"></media>
rx  </message>
Merge pull request #92 from ardianys/patch-2

media attrib changes
Merge pull request #89 from Amirjan/master

fix groupIsCreated event
Detect if previously connected and the socket is still alive.