• http://iki.fi/dst/ OlliS

    Adam, thanks for this – looks like the exact thing I need right now. One question, though: how would you feed multiple urls to multi-curl? Let’s say we keep first_name and last_name in place but want to loop through a bunch of listnames. 
    Do we just create as many $chFOO variables as we need and then call curl_multi_add_handle($mh, $ch1, $ch2, $ch3); and so on?

    • http://adamcap.com/ Adam Capriola

      Hey Ollis! Yes… sorta. You make as many $chFOO variables as you need, then for each instance above where I have use $ch1, you need to duplicate it and add in the $chFOO.

      So like you’d need: 

      curl_setopt_array( $ch1, $options );
      curl_setopt_array( $ch2, $options );
      curl_setopt_array( $ch3, $options );

      and 

      curl_multi_add_handle($mh, $ch1);
      curl_multi_add_handle($mh, $ch2);
      curl_multi_add_handle($mh, $ch3);

      etc… each spot where I use $ch1, copy it.

  • Anonymous

    Adam, I added the full code at the very end of my functions.php and when I click update file I get a server error. any thoughts? hope i can get this to work as its exactly what i am looking for.

    • http://adamcap.com/ Adam Capriola

      I don’t have time to test this out again (last time I ran the code it worked), but here’s what here’s what’s most recently saved in my files: https://gist.github.com/1866050

      Edit line 43 to include your list name and it should be good.

      • Anonymous

        Adam, i did edit line 43 and added my aweber list name and I can see the function working with the new check box. the WP registration is ok, however, I don’t get any aweber entry. besides setup my aweber list do i have to do anything else there?

        • http://adamcap.com/ Adam Capriola

          You have to give it some time; Aweber doesn’t updated immediately. Try registering with a few different personal e-mail addresses and it should eventually start working.

  • Anonymous

    Adam, is there any way to get help with whatever is going on. thanks, ray