Hot answers tagged

3

Firstly 2.5.9 is 4 and a half years old and has a number of known security holes. Secondly, it sounds like you want to make a curl post request and not any kind of redirect. If the email is sent then the $send variable will be truthy so you would write something like the following straight after your code above. if($send){ // set your destination $...


2

Just to have a valid answer. The problem was in $options - it is an array, but JHttpTransportCurl constructor require JRegistry instance. So $options = array(); should be changed to $options = new JRegistry();


1

This error was caused by the AutoTweet NG Light RSS module. As I could see the RSS feed in my browser I was reasonably sure the 403 forbidden error was a red herring. I tested this by trying Joomla! Core Mod_feed (feed display), this worked. I can only assume some sort of server configuration error due to cURL but I do not control the server so this is ...


1

As can be seen from the updates to the original question, I have been able to make my code work although I ended up not using com_ajax and built my own component based on it. There were a couple of snags along the way but by creating my own little component, I got the code behaving as I need. To do this, I had to add a CORS header to the .htaccess file of ...


1

I had partial success with the following, thanks to this answer mainly: <?php function retrieveURL($relativeURL){ $uname = "user"; //this is the privileged user to the relative url we want $upswd = "pass"; $domain = $_SERVER['HTTP_HOST']; $prefix = $_SERVER['HTTPS'] ? 'https://' : 'http://'; $url_get_key = $prefix.$domain."index....


1

You have to create an authentification plugin see the documnentation :https://docs.joomla.org/J3.x:Creating_an_Authentication_Plugin_for_Joomla/en and my pseudo code below <?php /** * @version $Id: myauth.php 7180 2007-04-23 16:51:53Z jinx $ * @package Joomla.Tutorials * @subpackage Plugins * @license GNU/GPL */ ...


1

You must use onUserAfterLogin as this triggered after successful login. Authenticate is called to verify login credentials (for example you can use it to block login for users with specific IP, or to create login with email


1

Somehow, by just adding $headers to the post call, it now works, so I took out $http->setOption(CURLOPT_HTTPHEADER, $headers); and changed the code to the following: if (JHttpTransportCurl::isSupported()) { $headers = array( 'Content-Type' => 'application/json', 'Authorization' => 'Basic ' . base64_encode($username . ":" . $...


1

Set the following cURL options: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); CURLOPT_SSL_VERIFYPEER - verify the peer's SSL certificate (http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html) CURLOPT_SSL_VERIFYHOST - verify the certificate's name against host (http://curl.haxx.se/libcurl/c/...


Only top voted, non community-wiki answers of a minimum length are eligible