Yii Framework Forum: Using Curl instead of fopen - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Using Curl instead of fopen Rate Topic: -----

#1 User is offline   ridz 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 05-August 11

Posted 22 March 2017 - 09:40 PM

Hi,

My server does not allow to use fopen. I need help to use curl instead. Any help is appreciated. Thanks.

            $stream = fopen($url, 'rb', false, $context);
            $responseContent = stream_get_contents($stream);
            $responseHeaders = $http_response_header;
            fclose($stream);
            

0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,694
  • Joined: 10-October 10
  • Location:Denmark

Posted 23 March 2017 - 11:52 AM

Try this
"Less noise - more signal"
1

#3 User is offline   Quickrep 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-September 17

Posted 26 September 2017 - 10:04 PM

In this case I think you should use CURL better.
Https://quickrep.vn is small project website hoi dap truc tuyen in vietnamese with Yii2 Framework
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users