Is there any way to redirect to external url with parameters from a controller? I'm using joomla 2.5.9 and I have a controller that sends emails to the administrator. After an email is sent successfully, I need to send some details to another site for further proceedings. Can I use cURL like core php ? Here is my controller code :
$mailer = JFactory::getMailer();
$config = JFactory::getConfig();
$sender = array($config->getValue( 'config.mailfrom' ),$config->getValue( 'config.fromname' ));
$mailer->setSender($sender);
$admin = JFactory::getUser(42);
$admin_email = ($admin->email)? $admin->email: $config->getValue( 'config.mailfrom' );
$mailer->addRecipient($admin_email);
$mailer->setSubject('New Reservation ('.ucfirst($data['package_hotel']).')');
$body = 'Dear Manager,<br><br>'
.'<div>You have received a new reservation request ('.$data['package_hotel'].') from '
.$data['name'].'. '
.'"'.$package_hotel_name.'" '.$data['package_hotel'].' dated '.$data['date_from'].'.</div><br>'
.'<h3>Details</h3>'
.'<div>Name: '.$data['name'].'</div>'
.'<div>Address: '.$data['address'].'</div>'
.'<div>Email: '.$data['email'].'</div>'
.'<div>Mobile Number: '.$data['mobile'].'</div>'
.'<div>Phone Number: '.$data['phone'].'</div>'
.'<div>Arrival Date: '.$data['date_from'].'</div>'
.'<div>Departure Date: '.$data['date_to'].'</div>'
.'<div>'.ucfirst($data['package_hotel']).': '.$package_hotel_name.'</div>'
.'<div>No of Adults: '.$data['adults'].'</div>'
.'<div>No of Children: '.$data['children'].'</div>'
.'<div>Comments: '.$data['message'].'</div>'
.'<br><br><div>Regards,</div>'
.'<div>Godwin Holidays</div>';
$mailer->isHTML(true);
$mailer->Encoding = 'base64';
$mailer->setBody($body);
$send = $mailer->Send();
If email sent successfully, then I want to send the above details to some other site say example.com
. I'm new to Joomla, so please help me