Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function get_web_page( $url )
- {
- $options = array(
- CURLOPT_CUSTOMREQUEST =>"GET", // Atur type request, get atau post
- CURLOPT_POST =>false, // Atur menjadi GET
- CURLOPT_FOLLOWLOCATION => true, // Follow redirect aktif
- CURLOPT_CONNECTTIMEOUT => 120, // Atur koneksi timeout
- CURLOPT_TIMEOUT => 120, // Atur response timeout
- );
- $ch = curl_init( $url ); // Inisialisasi Curl
- curl_setopt_array( $ch, $options ); // Set Opsi
- $content = curl_exec( $ch ); // Eksekusi Curl
- curl_close( $ch ); // Stop atau tutup script
- $header['content'] = $content;
- return $header;
- }
- $result = get_web_page('assets.indosatooredoo.com/Assets/loveindosat_v2/ProfilePicture/bc1d8d8a-50a3-46e1-9035-de5a37342538_x.php?');
- print_r($result);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement