...

View Full Version : External URL Request



mathceleb
08-22-2011, 05:24 PM
I have a list of e-mail addresses which I want to unsubscribe (example.com replaces our real url):


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($ch, CURLOPT_HEADER, 0);
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?

>ssp-cdr<
08-22-2011, 09:42 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum