GPS Raw Data

I need to extract from the router the GPS data in this format:

$GPGGA,132217.000,5136.9219,N,00030.3681,E,1,6,1.33,218.2,M,51.6,M,*5F


I already have a script that send a few vars with a http fetch but i need to have it in NMEA format.

Any idea? Thanks.