Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2010
    Posts
    235
    Thanks
    39
    Thanked 6 Times in 6 Posts

    External URL Request

    I have a list of e-mail addresses which I want to unsubscribe (example.com replaces our real url):

    PHP Code:
    foreach ($final_list as $value){
    $value2=rawurlencode($value);
    $url1="http://example.com/?q=direct_unsub&fn=Public_DirectUnsubForm&id=bjtwytqttkhejtfrmnxswcevupwgbln&email=$value2";
    $ch curl_init($url1);
    curl_setopt($chCURLOPT_HEADER0);
    curl_exec($ch);
    curl_close($ch);

    Is this the best way to do this? I'm getting some garbled text on the return value. Is there a way to send the request without getting a return value?

  • #2
    Regular Coder
    Join Date
    May 2007
    Posts
    108
    Thanks
    19
    Thanked 13 Times in 13 Posts
    I'm not sure how the CURL functions work. What I use if I need to send a request like this is the include() function, though it requires output buffering to handle/ignore the output/return value of the request.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •