alternative scripts for fopen

Discussion in 'PHP' started by Anima_Hariop, Jan 19, 2009.

  1. Anima_Hariop

    Anima_Hariop New Member

    Joined:
    Jan 19, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Still an engineering student
    Location:
    Philippines
    Many free web hosts set allow_url_fopen to off and that's why I can't use fopen. I just want to know if there is a way I can open a file, specifically a text file (*.txt), via an external url.
     
  2. programmersbank

    programmersbank New Member

    Joined:
    Apr 6, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    if you have a .txt file on same server then use fopen function, you can see details at php.net/fopen

    or use this line in your .htaccess file
    php_value allow_url_fopen 1

    you can consider using curl, if it is enabled.
     
  3. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice