Adding users to each other's roster

I am able to use below to successfully register a user.

<iq type='set' id='reg1' to='localhost'><query xmlns='jabber:iq:register'><username>$username</username><password>$password</password></query></iq>

I am unable to figure out an iq type to add users to each other's roster. Any hints? My PHP code is on same server and am using localhost to connect. Any other option that to use iq?

Syndicate content