mtaydinbas Posted February 28, 2013 Share Posted February 28, 2013 i want to manipulate a joomla component for my site. component has no ability to do what i want. i create a db row for component, for every new users. but i coudn't resolve parent id column to insert the correct value. i have to login to panel and open that category id, and just click "save and close" button for every new users. it is a manuel solution. but can i do it by running "file_get_contents". like this: $url = "/index.php?option=com_joomgallery&controller=categories&task=edit&cid=59"; $postdata=http_build_query(array("usr" => "xxxx", "pass" => "xxx", "cid" => "59", "javascript" => ""Joomla.submitbutton('save')"")); $opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata)); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); source code part: <li class="button" id="toolbar-save"> <a href="#" onclick="Joomla.submitbutton('save')" class="toolbar"> <span class="icon-32-save"> </span> Save & Close </a> </li> could i explain the problem clearly??? categories.php Quote Link to comment https://forums.phpfreaks.com/topic/275065-how-file_get_contents-including-custom-javascript-function/ Share on other sites More sharing options...
trq Posted February 28, 2013 Share Posted February 28, 2013 could i explain the problem clearly???You should probably try to. Quote Link to comment https://forums.phpfreaks.com/topic/275065-how-file_get_contents-including-custom-javascript-function/#findComment-1415701 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.