replaced getLink function by php5 http_build_query function