title: Change User-Agent Using PHP
body: <p>I have an app on my server which redirects to Facebook and thus displays the browser version of the Facebook Login page.</p>
  
  <p>However, since I'll be accessing this through a mobile device, I'll want it to display the mobile version of the Facebook login page.</p>
  
  <p>Is it possible to use the header() function or is there a way to change the user-agent on my host before it redirects to Facebook? So that Facebook will think the request is coming from a mobile device and thus render the mobile version.</p>
  
  <p>I have already tried to use JavaScript and tried spoofing the header command; unfortunately these didn't work.</p>
  
  <p>Thank you.</p>