Link to home
Start Free TrialLog in
Avatar of charmingduck
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?
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Please post a link to a URL that has the pricing, thanks.
Avatar of charmingduck
charmingduck

ASKER

bluehost.com
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
See if this comes close...
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);

Open in new window

would you write me the script so I get '3' and '.96' respectively?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
mind explaining this a bit ?


$a = preg_replace('#[^0-9\.]#', NULL, $a);



what does the first parameter, the pattern mean?  and NULL here means?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial