1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem with CURL

Discussion in 'PHP' started by Icheb, Feb 18, 2007.

  1. #1
    I have to write a string to a file and I can't use fopen, however all examples I find on the web rely on fopen. The string is generated on the fly. Is there even a way to do this with CURL?
     
    Icheb, Feb 18, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    I think that even if you cURL'd to the file, you'd still have to use fopen at some point to write the cURL POST parameters...
     
    frankcow, Feb 18, 2007 IP
  3. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How would I write a string to a file then?
     
    Icheb, Feb 18, 2007 IP
  4. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #4
    I'm not sure that there's any other way than with fopen.

    Why can't you use it?
     
    frankcow, Feb 18, 2007 IP
  5. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #5
    allow_url_fopen is disabled and fopen is disabled through php.ini.
     
    Icheb, Feb 18, 2007 IP
  6. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #6
    contact your host, ask them to enable it for your domain
     
    frankcow, Feb 18, 2007 IP
  7. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Gee thanks, I would have never figured that out without you.
     
    Icheb, Feb 18, 2007 IP
    frankcow likes this.
  8. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #8
    you're welcome, that's what this forum is for!
     
    frankcow, Feb 18, 2007 IP
  9. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I guess my signature wasn't clear enough. =p
     
    Icheb, Feb 18, 2007 IP
  10. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Apart from all the sarcasm going on, can you please explain a bit better your problem? Do you need to write to a *remote* file? What would you need cURL for? You can use that to POST (or GET, obviously) to a remote script, but I don't really understand your question...
     
    picouli, Feb 18, 2007 IP
  11. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #11
    you may think you're being clever and edgy, but you just come across as cocky and annoying.

    If I were you, I would refrain from insulting people that are trying to help you understand very basic things.
     
    frankcow, Feb 18, 2007 IP