airhaul Posted July 8, 2014 Report Share Posted July 8, 2014 Add under routes section on schedule_briefing.tpl Will display top route flown from vataware I admit not the most graceful code....but what the hay...it works <?php $url = 'http://vataware.com/citypair/'.$schedule->depicao.'-'.$schedule->arricao.''; $page = file_get_contents($url); $start_char = '/flight/'; $end_char = '</a></td>'; $start_pos = strpos($page, $start_char); $end_pos = strpos($page, $end_char); $start_pos += strlen($start_char); $end_pos += strlen($end_char); $string = substr($page, $start_pos, ($end_pos - $start_pos)); $start_char = '>'; $start_pos = strpos($string, $start_char) + 1; $string = substr($string, $start_pos); echo $string; ?> Quote Link to comment Share on other sites More sharing options...
poole3003 Posted October 10, 2014 Report Share Posted October 10, 2014 would it be possible to get all your current code for this please as i tried it 4 different ways and it still doesn't work Quote Link to comment Share on other sites More sharing options...
airhaul Posted October 27, 2014 Author Report Share Posted October 27, 2014 That is all the code that is needed...just make sure you are inserting it into schedule_briefing.tpl.....maybe do a print_r($schedule->depicao); first to make sure the variables are being called correctly to the page....only way it wouldn't work is if variables are not being called or using a different name Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.