Skip to content

Instantly share code, notes, and snippets.

@Stichoza
Created February 22, 2016 06:57
Show Gist options
  • Save Stichoza/f16411779d8be88c212a to your computer and use it in GitHub Desktop.
Save Stichoza/f16411779d8be88c212a to your computer and use it in GitHub Desktop.
[TextBar] Show container tracking status (cma-cgm)
<?php
$data = file_get_contents('http://www.cma-cgm.com/ebusiness/tracking/search?SearchBy=Container&Reference=CONTAINER_NUMBER');
$exp = explode('class="date-current"', $data);
$exp = explode('data-move="status', $exp[1]);
preg_match('/(.+\>)(.+)(\<.+)/', $exp[1], $matches);
echo $matches[2];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment