I am using Codeigniter 3 to build an application with PHP Desktop and I am trying to get the base url to execute an ajax script in javascript.
$.get( "<?php echo base_url("print_ticket_associate.php"); ?>", { pin: pin, dash : "no", entree : "0", dessert : "0", repas :"1", badge : badge } );
Unfortunately, my configuration include random port on http and I need to include this to my base url on codeigniter. This means I can not set it in configuration.
Assuming the page I am trying to execute the script from is : login/match, base url for for codeigniter will be http://localhost/login/match. Which means it is not possible to paste the port after the string. I want to access http://localhost:randomPort/print_ticket_associate.php
Is there a way to get that port at a specific time in codeigniter page ?