Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-02-2010, 06:02 PM   PM User | #1
technica
Regular Coder

 
Join Date: Dec 2007
Posts: 106
Thanks: 0
Thanked 3 Times in 3 Posts
technica is an unknown quantity at this point
Run the file from PHP?

Hello friends,

I am working on some project related to Indian Stock exchange.

I have a feed URL http://nseindia.com//marketinfo/equi...RUTI&series=EQ

I know I can use Ajax to run this URL and fetch the data BUT I don't want to do it this way.

Rather, is there any way that I can run this URL from PHP script and store the result into PHP array?

I don't want to use JavaScript or Ajax for this.
__________________
Programming & Webmaster Forum - AdSense Revenue Sharing forum
technica is offline   Reply With Quote
Old 03-02-2010, 06:07 PM   PM User | #2
bacterozoid
Regular Coder

 
bacterozoid's Avatar
 
Join Date: Jun 2002
Location: USA
Posts: 486
Thanks: 23
Thanked 35 Times in 35 Posts
bacterozoid is an unknown quantity at this point
Look for some examples using curl. You can read that data pretty easily.
bacterozoid is offline   Reply With Quote
Old 03-02-2010, 06:17 PM   PM User | #3
technica
Regular Coder

 
Join Date: Dec 2007
Posts: 106
Thanks: 0
Thanked 3 Times in 3 Posts
technica is an unknown quantity at this point
Any specific information on how to install it?
__________________
Programming & Webmaster Forum - AdSense Revenue Sharing forum
technica is offline   Reply With Quote
Old 03-02-2010, 06:34 PM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Doesn't file_get_contents() suit for you to get the output?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 03-02-2010, 07:28 PM   PM User | #5
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Quote:
Originally Posted by abduraooft View Post
Doesn't file_get_contents() suit for you to get the output?
Exactly what you want, BUT its only usable via HTTP if allow_url_fopen is enabled (which I believe it is by default). If disabled, curl is the way to go.

As for installing curl, if you're on you're own server, there is a quick installation guid on the api: http://www.php.net/manual/en/curl.installation.php
If you're hosted, thats likely already enabled since its a commonly used extension.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:35 PM.


Advertisement
Log in to turn off these ads.