🔒 Closed Download file from site

Status
Not open for further replies.
Mga master dyan sa web, patulong sana ako. gusto ko mag download ng file d2 You do not have permission to view the full content of this post. Log in or register now. pero mali ata ang url ko para sa file
Code:
<?php

$dlurl = 'http://www.pse.com.ph/stockMarket/marketInfo-marketActivity.html?tab=4/stockQuotes_04042017.pdf';

$saveTo = 'nixon\stockQuotes_04042017.pdf';

$fp = fopen($saveTo, 'w+');

if($fp == false){
    throw new Exception('Could not open:' .$saveTo);
}

$ch = curl_init($dlurl);

curl_setopt($CurlConnect, CURLOPT_HEADER, true);
//curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FILE, $fp);


curl_exec($ch);

curl_close($ch);

fclose($fp);

?>

ano po ang mali sa code ko. patulong po
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 1K
    Views
  • 3
    Participants
Last reply from:
Baguhanprogrammer

Trending Topics

Online now

Members online
1,209
Guests online
15,336
Total visitors
16,545

Forum statistics

Threads
2,364,884
Posts
29,427,718
Members
1,048,836
Latest member
Junelle007
Back
Top