Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2. function ngeg($url){
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL,$url);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  6. curl_setopt($ch, CURLOPT_ENCODING, ""); // handling all compressions
  7. $uaa = $_SERVER['HTTP_USER_AGENT'];
  8. curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: $uaa");
  9. return curl_exec($ch);
  10. }
  11. $check = ngeg('https://item.taobao.com/item.htm?spm=a21wu.241046-global.4691948847.13.41cab6cb1eKWMD&scm=1007.15423.84311.100200300000005&id=525252200192&pvid=d14e49b1-7076-4943-86ee-3da63c159121&fbclid=IwAR1IP1so-jHkB5bNFBNXPsGwWMB3tCn_HInKfdkaneLYrrmdtlvRpvA-zVs');
  12. $check = mb_convert_encoding ($check, 'utf-8', 'GB2312');
  13. echo $check;
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement