• 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.

      • joecap1

        http://adamcap.com/2011/10/how-to-integrate-aweber-and-wordpress-registration-without-a-plugin/

        I have the code opened in notepad….I am looking to find where I can enter my list id information….you mentioned line 43….

        What am I missing?

        Also, where in my functions.php do I enter the code?

        Great work!

        • http://adamcap.com/ Adam Capriola

          Sorry! Line 106. I added some code that was missing originally to the beginning. I’ll try to eventually turn this into a plugin so it’s easier to install.

          And you can stick it at the end of your functions.php file, after the last “}” and before the closing “?>”

  • Anonymous

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

  • Anonymous

    I have had an aweber account for years with many names and lists. Usually a new name is updated within minutes but now its been 3 hours. i have tried a new list and an existing list, neither registered a new name. ill keep playing with it. if you think of anything let me know please. i know it should just work but for some reason it is not. i am using WP 3.3.1

    • http://adamcap.com/ Adam Capriola

      Updated the gist, I forgot to copy the first part over: https://gist.github.com/1866050

      Maybe try uncommenting line 144. If you want me to take a real serious look at it though, I’ll need a donation.

  • Andrew Pollock

    I see where we add our list name but don’t we have to specify our aWeber account somewhere. Surely more than one person might use the same listname?
    Also if we don’t need any ad tracking can we just leave that variable alone?

    • http://adamcap.com/ Adam Capriola

      AWeber only has unique list names. You’ll notice when you create a new list, you can’t just choose any name you want (most are taken already).

      And yes, you can ignore the tracking if you don’t need it.