1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

get the extreme statics with preg_match

Discussion in 'PHP' started by Caesar, Mar 28, 2007.

  1. #1
    hi,

    i used extreme static pages 'n get static information.

    i share it to dp users;

    read.php
    
    <?
    /* 
     * Coder: Olgar (Caesar) Verim 
     * info@olgarverim.com
     */
    $page="http://extremetracking.com/open;sum?login=loginname"; //?login= your account information
    $today = date("d M, D, Y"); //get today extreme type
    $yesterday = date("d M, D, Y", strtotime("yesterday")); //get yesterday extreme type
    
    $kaynak=file_get_contents($page);
    
        $t_gun="#Today(.*?)".$today."#si";
        $t_dun="#Yesterday(.*?)".$yesterday."#si";
       
        preg_match($t_gun,$kaynak,$d_gun);
        preg_match($t_dun,$kaynak,$d_dun);
       
        $d_gun=strip_tags($d_gun[1]);
        $d_dun=strip_tags($d_dun[1]);
       
        echo "Today: ".$d_gun." person<br>";
        echo "Yesterday: ".$d_dun." person";
    ?> 
    
    PHP:
    example: http://www.phpogreniyorum.info/demo/ext.php
     
    Caesar, Mar 28, 2007 IP