read data from crm API with php -> tutorial?
Hi,
im using joomla with jumi and would like to read products from crm. I am stuck.
would you have an example how to create the stream and read a record ?
m using the code from the wiki...
<?php
$file = fopen("http://crm.zoho.com/crm/private/xml/Leads/getRecords?ticket=ticket&apikey=bLG459VUkJ25AFLtaRLyDxxxxxxxxxxGWeIdlI$", "r") or exit("Unable to open file!");
while(!feof($file))
{
$theData=fgets($file);
}
fclose($file);
echo $theData;
?>
and get the following error:
Warning: fopen(http://crm.zoho.com/crm/private/xml/Leads/getRecords?ticket=ticket&apikey=bLG459VUkJ25AFLtaRLyDxxxxxxxxxxGWeIdlI$) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /homepages/3/d13407505/htdocs/EPA/P/modules/mod_jumi/jumi_demo2.php on line 13
Unable to open file!
could you post a sample that reads a record from contacts or products in php please ?