CodeIgniter Forums
Reading content type in PHP..? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Reading content type in PHP..? (/showthread.php?tid=4791)



Reading content type in PHP..? - El Forum - 12-16-2007

[eluser]Lovecannon[/eluser]
Okay, Im creating a proxy for an AJAX application with PHP, and its done like this:
Code:
$this->passion->enableGet();
        $url = $_GET['url'];
        $content = file_get_contents($url);
And so far, I have it set up so you can either manually specify the format of the data, or it can figure it out through a file extension..the problem is, you come up with clean URLs that dont have a file extension, and Im trying to figure out an automatic way of figuring out the content type with PHP, but Im not sure of how to do that..anyone have any ideas?


Reading content type in PHP..? - El Forum - 12-16-2007

[eluser]Lovecannon[/eluser]
Well I found a solution, so never mind this.