Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function content($url) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13");
- $headers = array
- (
- 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*;q=0.8',
- 'Accept-Language: ru,en-us;q=0.7,en;q=0.3',
- 'Accept-Encoding: gzip',
- #'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7'
- );
- curl_setopt($ch, CURLOPT_PROXY, '81.177.27.248:31340');
- curl_setopt($ch, CURLOPT_PROXYUSERPWD, "FMqTVm:43DP4P");
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch,CURLOPT_ENCODING, "");
- $cont = curl_exec($ch);
- return $cont;
- }
- var_dump(content('https://testurl.ru'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement