charmingduck
asked on
auto display
I am building a website in php, and I want to show the pricing of bluehost.com's web hosting plan. How do I crawl the site and read the pricing and display it on my site? can somebody show me the code?
Please post a link to a URL that has the pricing, thanks.
ASKER
bluehost.com
ASKER
I couldn't find the priciing on bluehost.com in type form, so what about this
http://www.hostgator.com/shared.shtml
I need to get the 3.96
http://www.hostgator.com/shared.shtml
I need to get the 3.96
See if this comes close...
http://www.laprbass.com/RAY_temp_charmingduck.php
http://www.laprbass.com/RAY_temp_charmingduck.php
<?php // RAY_temp_charmingduck.php
error_reporting(E_ALL);
$x = file_get_contents('http://www.hostgator.com/shared.shtml');
$a = explode('Starting at', $x);
$a = explode('/mo', $a[1]);
$a = trim($a[0]);
var_dump($a);
ASKER
would you write me the script so I get '3' and '.96' respectively?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mind explaining this a bit ?
$a = preg_replace('#[^0-9\.]#', NULL, $a);
what does the first parameter, the pattern mean? and NULL here means?
$a = preg_replace('#[^0-9\.]#',
what does the first parameter, the pattern mean? and NULL here means?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.