You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Using curl to upload a file attachment

Received Response
72
Views
4
Comments

Summary:

Does anyone have the code to upload a file attachment by php.

Content (required):

Does anyone have the code to upload a file attachment by php. I keep getting "missing localfname" but cannot set it. Every example I can find, uses get_contents which doesn't work anymore.

Version (include the version you are using, if applicable):


Code Snippet (add any code snippets that support your topic, if applicable):

    load_curl();

    $curl = curl_init();


    $url = 'http://www.adserversite.com/ads.php';


    curl_setopt_array($curl,array(

    CURLOPT_URL => $url,

    CURLOPT_HEADER => 0,

    CURLOPT_HTTPHEADER => "test",

    CURLOPT_FOLLOWLOCATION => 1,

    CURLOPT_RETURNTRANSFER => 1,

    CURLOPT_CONNECTTIMEOUT => 20,

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!