Tuesday, September 17, 2013

How can I get stock quotes using Google Finance API?

here is those google services url, you can find the real time stock quotes:
here is some tips : you can using the jquery and javascript  getdate through setinterval execute the json url
return Json api : http://finance.google.com/finance/info?client=ig&q=idfc

here some tips : you can using the javascript  and curl getdate through setinterval execute the json url
return xml apiv: http://www.google.com/ig/api?stock=hdfc

i think these two google services URL hope help you.

more details

Friday, September 13, 2013

how to set cron job scheduler php page execute

1 step -> Go to control planel
2step ->click Cron job
3step-> create standard cron job scheduler
4step-> put you scheduler  time to execute
last step -> put application directory root path with page  your command "input box" then click  ok example below
simple create sendemail.php

PHP example: check your php version on server then get path like :<?php  echo getcwd(); ?>

Command to run for a PHP5 cron job:
/home3/youruserfoldername/public_html/sendemail.php
Command to run for a PHP4 cron job:
/home3/youruserfoldername/public_html/sendemail.php



How does i execute Cron job using browse direct URL

<php 
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://sadf/profiles/emailalert");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
$result=curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);
if($result){
echo "execute by curl ok and sending mail";
}else{
echo "not execute curl funation";
}
?>