Código PHP:
$url = "http://www.google.com/ig/calculator?hl=en&q=$amount$from_Currency=?$to_Currency";
por eso ahora estoy tratando de parsear con este:
Código PHP:
https://www.google.com/search?q=100+pen+to+usd
Código PHP:
function currency($amount,$ToCurrency,$FromCurrency)
{
$returnHtml = array();
$page = "http://www.google.com/search?&q=$amount+$ToCurrency+in+$FromCurrency";
$returnRawHtml = file_get_contents( $page );
curl_setopt ($ch, CURLOPT_URL, $url);
preg_match_all('/<h2 class=r(.*)\<\/h2\>/Uis',$returnRawHtml,$returnHtml,PREG_PATTERN_ORDER);
if (isset($returnHtml[0][0]))
{
$gRate = strip_tags($returnHtml[0][0]);
return $gRate;
}
else {
return false;
}
}
Código PHP:
function currency($amount,$ToCurrency,$FromCurrency)
{
$returnHtml = array();
$page = "http://www.google.com/search?&q=$amount+$ToCurrency+in+$FromCurrency";
$returnRawHtml = file_get_contents( $page );
curl_setopt ($ch, CURLOPT_URL, $url);
preg_match_all('/<h2 class=r(.*)\<\/h2\>/Uis',$returnRawHtml,$returnHtml,PREG_PATTERN_ORDER);
return $returnRawHtml;
}
Código PHP:
http://www.promovendo.net/sadi/cart.php