I've been working on a Ajax function on my website hosted on godaddy. My Ajax function requires me to open the port 8192. I tried contacting godaddy but they just told me that they are unable to open any port for security reasons.
I've tried finding a solution for a good couple of hours now. From what I've read its supposed to be possible to host the ajax php file on a cdn. I came across AWS CloudFront and their Bucket Storage, but apparently they only support static pages like css and so.
Is there any way for me to host my PHP Ajax file outisde of my main web hosting?
First, to answer your question, CDN's host only your static content (CSS, JS, SWF, IMG files...)
You can't have an open port for you in any shared hosting plan including Godaddy and others.
You need a root access in order to allow connections via port 8192, the solution is to acquire a VPS or Dedicated hosting. VPS preferred for your case.
You can install Apache/Nginx, PHP in your Linux VPS, configure the web server to accept connections via port 8192, and also allow it in the iptables, then host your PHP file, and you can access it : http://SERVER_IP_OR_NAME.TLD:8192/ajax_file.php
OVH offers very cheap VPS starting price $2.99 /month, or Digitalocean $5 /month, if you prefer Amazon Web Service, they provide Cloud server the service is named Amazon EC2, and you can obtain a cloud server first year free of charge.