Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomedasala = 'nome da sala';
- $url = 'https://appear.in/' . urlencode($nomedasala);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- //Define um User-agent
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0');
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- //Retorna a resposta
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- //Resposta
- $data = curl_exec($ch);
- //Desliga
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement