I hope you take pleasure in taking a look at your monitor.
My head blew after two days of onerous work and experimenting with numerous strategies.
I am having bother sending variable information (string: hyperlink) from a plugin to a theme file to course of and return one thing.
That is how I exploit curl
$dirrrr="https://mysite.on-line/wp-content/themes/my-theme/libs/addons/consists of/scrapdata.php";
$p_link = 'https://examplesite.com/black-kinemaster-1.html';
$p = $p_link;
$ch = curl_init($dirrrr);
$information = "p=$p" ; //or array('p'=> $p)
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $information);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($ch, CURLOPT_HEADER ,0); // DO NOT RETURN HTTP HEADERS
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$Rec_Data = curl_exec($ch);
What’s the greatest technique for sending information between plugins? (Is it wp hooks? if I am not in wordpress cms and simply utilizing pure php?)
thanks