I want to pass an URL to some function in PHP. My concern is related to the value of server variable $_SERVER['HTTP_USER_AGENT']
Actually when I made a request from the browser the respective function works fine but when I made a request from CURL or iOS mobile app it gives following data, in both these cases the function doesn't perform well. I want the exactly equivalent value in these two requests likerequest made from browser.
Following are the three outputs/responses of (echo $_SERVER['HTTP_USER_AGENT'];
)from the three different requests:
Response when request made from Mozilla Firefox:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Response when request made from CURL(Terminal on Ubuntu Linux):
curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Response when request made from iOS app :
Campusknot/31 (iPhone Simulator; iOS 8.3; Scale/2.00)
Please help me in order to work the function from iOS app as well as from CURL, from web browser it is working fine now, so no new issues with the request made from web. Thanks in advance.