i know PHP is a server side script and js is a client side but i have an issue..
I needed to bypass the browser security when doing an ajax request to another domain and it was difficult for me to be honest i had no idea what i was doing so i turned to php.. wooohooo....
The issue is i can only use JS and CSS to run arbitrarily ontop of my tracking system!
I wanted to add a newsfeed.csv so i made this php code to get the csv and convert it and store it into the variable $json.
<?php
$file="http://www.jonar.com/portal/partner/js/newsroomcustomer.csv";
$csv= file_get_contents($file);
$checkit = utf8_encode($csv);
$array = array_map("str_getcsv", explode("
", $checkit));
$json = json_encode($array);
?>
Is there a way to do an ajax get to get the variables output? meaning the json format of my csv..
This way i can have my PHP script on my webserver and it will be able to grab any link on any domain..
Thanks guys :)