Hello, I want to retrieve website's contents using CURL or file_get_contents or something else treating that request to be considered as mobile browser request & it will show the mobile website as response instead of main website. For example if I want to retrieve mashable.com's contents using PHP , it should display its corresponding mobile site's contents. Is it possible to achieve this using PHP? Please help me. Thanks in advance.
You should be able to do it with cURL by setting a USER_AGENT header that emulates a mobile device's USER_AGENT header.
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent_string_here);