DOSPLUS Posted September 4, 2010 Share Posted September 4, 2010 Hi,I would like to trigger a URL when the virtual product download email is sent to the customer.Once the email is triggered, i want a loop that would take each product reference# and member email to be posted to a specific adress.for example, the script for the email contains these varaibles :$product_reference_number1 = [1] ;$product_reference_number2 = [2] ;$curstomer_email = [[email protected]] ;So when the loop executes, i would get these URL posted/triggered: http://www.mydomain.com/folded/process.php?item=1&[email protected] http://www.mydomain.com/folded/process.php?item=2&[email protected] Basically, these URL trigger another script!How could i do itI tried the following inside OrderHistory.php after line 151 without results. $URL="www.mydomain/folder/process.php"; $email = "[email protected]"; $item = "1"; $URL_tail = "?item=".$item."&smail;=".$email ; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://$URL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $URL_tail);curl_exec ($ch); curl_close ($ch); // End token Above should post this url invisibly: www.mydomain/folder/process.php?item=1&[email protected] Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 7, 2010 Share Posted September 7, 2010 Looks like you are wanting a GET. Change these to do a cURL GET: curl_setopt($ch, CURLOPT_URL,"http://$URL$URL_tail"); curl_setopt($ch, CURLOPT_GET, 1); curl_exec ($ch); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now