How can I get the longitude and latitude using PHP of the user's machine?

I need the it to be so the longitude if north is a positive value and if south it is a negative value/

And in terms of latitude, if east it is positive value and if west it is a negative value.

How can I do this?