• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_string_between函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_string_between函数的典型用法代码示例。如果您正苦于以下问题:PHP get_string_between函数的具体用法?PHP get_string_between怎么用?PHP get_string_between使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_string_between函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: set_skin

function set_skin($username, $password, $skin)
{
    $login_url = "https://minecraft.net/login";
    $skin_url = "https://minecraft.net/profile/skin";
    //first, login to Minecraft.net
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $login_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
    curl_setopt($ch, CURLOPT_HEADER, true);
    $fields = array("username" => urlencode($username), "password" => urlencode($password));
    post($ch, $fields);
    curl_exec($ch);
    //Then, load the profile page to retrieve authenticityToken
    curl_setopt($ch, CURLOPT_URL, $skin_url);
    $result = curl_exec($ch);
    $token = get_string_between($result, 'name="authenticityToken" value="', '">');
    //finally, post the skin update
    $headers = array("Content-Type:multipart/form-data");
    // cURL headers for file uploading
    $fields = array("model" => "steve", "skin" => "@{$skin}", "authenticityToken" => $token);
    $options = array(CURLOPT_URL => $skin_url, CURLOPT_HEADER => true, CURLOPT_POST => 1, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $fields, CURLOPT_RETURNTRANSFER => true);
    // cURL options
    curl_setopt_array($ch, $options);
    $result = urldecode(curl_exec($ch));
    curl_close($ch);
    if (strlen(strstr($result, "success=Your skin has been changed! It will take a couple of seconds for it to update.")) > 0) {
        return true;
    } else {
        return false;
    }
}
开发者ID:adamjdev,项目名称:Mineskull,代码行数:33,代码来源:change_skin.php


示例2: getCurrentGameWeekFromDOM

function getCurrentGameWeekFromDOM($DOMDoc)
{
    $finder = new DomXPath($DOMDoc);
    $classname = "ismH2HStandingsTable";
    $gameWeeks = $finder->query("//*[contains(@class, '{$classname}')]/tbody/tr/td/a");
    return get_string_between($gameWeeks->item(1)->getAttribute('href'), '/event-history/', '/');
}
开发者ID:Nielsenkills,项目名称:FPL-pleintjes-league-,代码行数:7,代码来源:api.php


示例3: parse

function parse($txt)
{
    $err = true;
    //$str = strip_tags($txt);
    $str = preg_replace('/\\s\\s+/', ' ', $txt);
    $str = trim($str);
    $data_size = substr_count($txt, '<tr');
    $w = explode("<tr", $txt);
    $j = 0;
    for ($i = 2; $i <= $data_size; $i++) {
        $pos1 = strpos($w[$i], '>') + 1;
        $pos2 = strlen($w[$i]);
        $dif = $pos2 - $pos1;
        $txt2 = substr($w[$i], $pos1, $dif);
        $v = explode("</td>", $txt2);
        $ticker_link = get_string_between($v[1], ">", "</td>");
        $ticker = get_string_between($ticker_link, "name=", "'");
        $array[$j][0] = $ticker;
        for ($k = 1; $k < 9; $k++) {
            $p1 = strpos($v[$k + 1], ">");
            $var = trim(substr($v[$k + 1], $p1 + 1, strlen($v[$k + 1]) - $p1));
            if ($var != 'n/a' && $var != '') {
                $array[$j][$k] = $var;
            } else {
                $array[$j][$k] = 0;
            }
        }
        $j++;
    }
    return $array;
}
开发者ID:sumaya87,项目名称:iqrahx,代码行数:31,代码来源:common_functions.php


示例4: errorCheck

function errorCheck()
{
    //check for error
    global $return, $data_contact, $url_curl, $userpwd, $content, $to_error, $headers, $modify, $url_contacts, $entityID;
    $status = 'default';
    $status = get_string_between($return, 'status":"', '"');
    $errorMessage = get_string_between($return, 'message":"', '"');
    if ($status !== "ok") {
        if (begins_with($errorMessage, "A duplicate record has been found")) {
            $modify = 'True';
            //if contacts table
            if ($url_curl == $url_contacts) {
                $entityID = filter_var($errorMessage, FILTER_SANITIZE_NUMBER_INT);
            }
            $url_curl = $url_curl . '/' . $entityID;
            sendData();
        } else {
            //set email variables
            $subject = 'Error: Hobson Radius Form';
            $message = 'There has been an error on the Hobson Radious Form Submission
            
            Status: ' . $status . '
            ***Modify: ' . $modify . '
            ***Error: ' . $errorMessage . '
            ***url:' . $url_curl . '
            ***entityID:' . $entityID . '
            ***error return:' . $return . '
            
            data send:' . print_r($data_contact, true);
            //send email
            mail($to_error, $subject, $message, $headers);
        }
    }
}
开发者ID:paulstraw,项目名称:BCSR,代码行数:34,代码来源:functions.php


示例5: cond

/**
 * Adds if statement logic to change output based on if statement.
 * 
 * 
 * @param mixed &$parsed
 * @return void
 */
function cond(&$parsed)
{
    global $cssp, $browser;
    foreach ($parsed as $block => $css) {
        foreach ($parsed[$block] as $selector => $styles) {
            foreach ($styles as $property => $values) {
                if (strpos($values[0], 'cond(') !== false) {
                    /**
                     * Clean up variable names and Formatting.
                     */
                    $condition = get_string_between($values[0], "cond(", ")");
                    $ifParams = explode("?", $condition);
                    $ifResults = explode(":", $ifParams[1]);
                    $ifCond = explode(" ", $ifParams[0]);
                    $ifCond[0] = interp($ifCond[0]);
                    //Convert PHP string to Values
                    $ifCond[2] = interp($ifCond[2]);
                    //Convert PHP string to Values
                    $test = compare($ifCond[0], $ifCond[1], $ifCond[2]);
                    $parsed[$block][$selector][$property] = '';
                    //Remove existing Cond Statement
                    if ($test) {
                        $parsed[$block][$selector][$property][] = $ifResults[0];
                        //Place True Value
                    } else {
                        $parsed[$block][$selector][$property][] = $ifResults[1];
                        //Place False Value
                    }
                }
            }
        }
    }
}
开发者ID:KealJones,项目名称:ConditionLogic-TurbineCSS-Plugin,代码行数:40,代码来源:cond.php


示例6: js_compile

function js_compile($file, $js_replace)
{
    $filedata = file_get_contents($file);
    //load file
    $js_includes = get_string_between($filedata, "<!--JS Compile Start-->", "<!--JS Compile Stop-->");
    $script_array = js_include_parse($js_includes);
    return concatenate_js($script_array, dirname($file), $js_replace);
}
开发者ID:rzel,项目名称:ajaxanimator,代码行数:8,代码来源:js.php


示例7: css_compile

function css_compile($file)
{
    $filedata = file_get_contents($file);
    //load file
    $css_includes = get_string_between($filedata, "<!--CSS Compile Start-->", "<!--CSS Compile Stop-->");
    $styles_array = css_include_parse($css_includes);
    return concatenate_css($styles_array, dirname($file));
}
开发者ID:rzel,项目名称:ajaxanimator,代码行数:8,代码来源:css.php


示例8: update_versions

function update_versions()
{
    $jdata = json_decode(get_string_between(file_get_contents("../../../js/version.js"), "/*START*/", "/*STOP*/"), true);
    $jdata["build"]++;
    $jdata["date"] = microtime(true);
    $json_enc = json_encode($jdata);
    $json_version = "/*Auto-Generated Ajax Animator Version config (Markup Version II)*/\n/*Generated By versions.php in /server/dev/compile/*/\nAx.set_version( /*START*/\n{$json_enc}\n/*STOP*/ )\n/*End Of File*/\n";
    file_put_contents("../../../js/version.js", $json_version);
    return $jdata["release"] . ".build" + $jdata["build"];
}
开发者ID:rzel,项目名称:ajaxanimator,代码行数:10,代码来源:versions.php


示例9: __construct

	function __construct($config_path){
		// extract the config name with some string magic get string between / and .php
		// check if only file name was provided
		$start = (!strpos($config_path,'/')?'':'/');
		$this->config_name = get_string_between($config_path,$start,'.php');
		$this->e_file = $config_path;
		$this->html = self::get_config();
		// we're using a post variable. Obviously if you didn't want to use this class you can write your own config files
		$this->html .=($_POST && $_POST['Update']?self::writeConfig():NULL);
		// I refresh it to avoid invalid form updates conflicts inside the object
		if($_POST && $_POST['Update']) self::reload_form(5);
	}
开发者ID:redcap3000,项目名称:conf_class,代码行数:12,代码来源:conf_class.php


示例10: gen_html

function gen_html($input)
{
    while (strpos($input, "<!--Remove Start-->") !== false) {
        $input = str_replace("<!--Remove Start-->" . get_string_between($input, "<!--Remove Start-->", "<!--Remove Stop-->") . "<!--Remove Stop-->", "", $input);
    }
    $input = str_replace("<!--Start Compile Include>", "", $input);
    $input = str_replace("<End Compile Include-->", "", $input);
    $input = str_replace("<!--COMPILIER INFO-->", "<!--" . file_get_contents("compilierinfo.txt") . "-->", $input);
    $input = sanitize_output($input);
    $input = str_replace("<!--ADS-->", file_get_contents("ads.txt"), $input);
    return $input;
}
开发者ID:rzel,项目名称:ajaxanimator,代码行数:12,代码来源:html.php


示例11: finishValidation

 /**
  * finishValidation method
  * @return array
  * */
 protected function finishValidation()
 {
     foreach ($this->fields as $field) {
         for ($i = 0; $i < sizeof($field['rules']); $i++) {
             $args = array();
             $args[] = isset($_REQUEST[$field['name']]) ? $_REQUEST[$field['name']] : null;
             if (strpos($field['rules'][$i], '[') !== FALSE) {
                 $cleanString = get_string_between($field['rules'][$i]);
                 $arg = str_replace('[', '', str_replace(']', '', $cleanString));
                 $rule = str_replace($cleanString, '', $field['rules'][$i]);
                 switch ($rule) {
                     case "matchWith":
                         $args[] = isset($_REQUEST[$arg]) ? $_REQUEST[$arg] : null;
                         break;
                     case "between":
                         $betweenParts = explode(',', $arg);
                         if (isset($betweenParts[0])) {
                             if (preg_match('/^[0-9]*$/', $betweenParts[0])) {
                                 $args[] = $betweenParts[0];
                             } else {
                                 exit('between first argument must be integer');
                             }
                             if (isset($betweenParts[1])) {
                                 if (preg_match('/^[0-9]*$/', $betweenParts[1])) {
                                     $args[] = $betweenParts[1];
                                 } else {
                                     exit('between second argument must be integer');
                                 }
                             } else {
                                 exit('between second argument is required');
                             }
                         } else {
                             exit('between first argument is required');
                         }
                         break;
                 }
                 $args[] = $arg;
             } else {
                 $rule = $field['rules'][$i];
             }
             $key = str_replace('[', '', str_replace(']', '', $rule));
             if (!call_user_func_array($this->getValidationTypes()[$key], $args)) {
                 $this->error[$field['label']] = $key;
             }
         }
     }
     $this->status = sizeof($this->getError()) > 0 ? 'error' : 'success';
 }
开发者ID:varyan,项目名称:namecpaseSystem,代码行数:52,代码来源:Validator.php


示例12: getEmailfromWeb

function getEmailfromWeb($websiteurl)
{
    $strarr = array('', 'contact.html', 'contact.htm', 'contact.php', 'contact', 'contactus.html', 'contactus.htm', 'contactus.php', 'contactus', 'contact_us.html', 'contact_us.htm', 'contact_us.php', 'contact_us', 'contact-us.html', 'contact-us.htm', 'contact-us.php', 'contact-us', 'about.html', 'about.htm', 'about.php', 'about', 'aboutus.html', 'aboutus.htm', 'aboutus.php', 'aboutus', 'about_us.html', 'about_us.htm', 'about_us.php', 'about_us', 'about-us.html', 'about-us.htm', 'about-us.php', 'about-us', 'feedback.html', 'feedback.htm', 'feedback.php', 'feedback');
    foreach ($strarr as $str) {
        $url = $websiteurl . '/' . $str;
        $url = str_replace('//' . $str, '/' . $str, $url);
        $content = get_data($url);
        if ($content == '') {
            //	$content = @file_get_contents($url);
        }
        if ($content != '') {
            //$emails = extract_emails_from($content);
            $emails = extract_email_address($content);
            if (count($emails) > 0) {
                $emails = array_unique($emails);
                return $emails;
            }
            $emails = extract_emails_from($content);
            if (count($emails) > 0) {
                $emails = array_unique($emails);
                return $emails;
            }
            if (strpos($content, 'mailto:') !== false) {
                $content = html_entity_decode($content);
                $emails = array();
                $email_temp = get_string_between($content, 'mailto:', '>');
                $emails[0] = explode(' ', $email_temp);
                if (count($emails) > 0 && $emails[0] != '') {
                    return $emails;
                }
            }
            $emails = extract_emails_from($content);
            if (count($emails) > 0) {
                $emails = array_unique($emails);
                return $emails;
            }
        } else {
            echo $url . " Content could not be fetched.<br />";
        }
        //sleep(rand(5,10));
    }
    return '';
}
开发者ID:sixthlife,项目名称:EmailScraper,代码行数:43,代码来源:functions.php


示例13: errorCheck

function errorCheck()
{
    /*check for error
      Hobson returns a string after form submission. We need to parse the string to determine the error. 
      */
    global $return, $data_contact, $url_curl, $userpwd, $content, $to_error, $headers, $modify, $url_contacts, $entityID;
    $status = 'default';
    $status = get_string_between($return, 'status":"', '"');
    $errorMessage = get_string_between($return, 'message":"', '"');
    //if we are ok, then there is not error and we can move on.
    if ($status !== "ok") {
        if (begins_with($errorMessage, "A duplicate record has been found")) {
            //The record already exists in the database, prepare to resubmit using the Modify/Put Method.
            $modify = 'True';
            //if contacts table
            if ($url_curl == $url_contacts) {
                $entityID = filter_var($errorMessage, FILTER_SANITIZE_NUMBER_INT);
            }
            $url_curl = $url_curl . '/' . $entityID;
            sendData();
        } else {
            //prepare variables for email
            $subject = 'Error: Hobson Radius Form';
            $message = 'There has been an error on the Hobson Radious Form Submission
            
            Status: ' . $status . '
            ***Modify: ' . $modify . '
            ***Error: ' . $errorMessage . '
            ***url:' . $url_curl . '
            ***entityID:' . $entityID . '
            ***error return:' . $return . '
            
            data send:' . print_r($data_contact, true);
            //send email
            mail($to_error, $subject, $message, $headers);
        }
    }
    //send email
    mail($to_error, $subject, $message, $headers);
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:40,代码来源:functions.php


示例14: getDetails

    function getDetails($plugin)
    {
        if ($this->request->is('ajax')) {
            $this->disableCache();
            $this->autoRender = false;
            $api = json_decode(file_get_contents("http://api.bukget.org/api2/bukkit/plugin/" . $plugin), TRUE);
            //debug($api);
            //Function to get strings
            function get_string_between($string, $start, $end)
            {
                $string = " " . $string;
                $ini = strpos($string, $start);
                if ($ini == 0) {
                    return "";
                }
                $ini += strlen($start);
                $len = strpos($string, $end, $ini) - $ini;
                return substr($string, $ini, $len);
            }
            $status = $api['stage'];
            $categories = implode(', ', $api['categories']);
            $authors = implode(', ', $api['authors']);
            $desc = $api['description'];
            $data = file_get_contents($api['link']);
            $img = get_string_between($data, 'data-full-src="', '"');
            echo <<<END
<ul>
  <li>
    <b>Status</b>
    <p>{$status}</p>
  </li>
  <li>
    <b>Categories</b>
    <p>{$categories}</p>
  </li>
    <li>
    <b>Authors</b>
    <p>{$authors}</p>
  </li>
  <li>
    <b>Description</b>
    <p>
    <img src="{$img}" width="250px" />
    {$desc}
    </p>
  </li>
</ul>'


END;
        }
    }
开发者ID:Tim-NL,项目名称:SpaceBukkitPanel,代码行数:52,代码来源:Bukget2Controller.php


示例15: makeJsonTrace

}
//on ecrit les données dans le fichier json trace
System_Daemon::info("Initialisation du fichier knxtrace.json");
makeJsonTrace($sniffed);
/*
Mise a jour du ficheir knxtrace.json a chaque modification d'un equipement suivi
*/
System_Daemon::info("Mise a jour du fichier knxtrace.json a chaque modification d'un equipement suivi et sauvegarde en base s'il doit etre historisé");
//$lastpos = 0;
while (true) {
    // On tail le fichier de log
    $knxlisten = tail(PATH_LOG, $lastpos);
    // On r�agit d�s qu'on a un Write
    // Pour chaque ligne, on r�cup�re le Groupe d'Addresse et de la valeur qu'on converti
    $groupaddr = get_string_between($knxlisten, 'group addr: ', ' -');
    $hexa = get_string_between($knxlisten, 'Hexa: ', ' -');
    //on met a jour le valeur dans le tableau et on regenere le fichier json
    //recursive_array_search
    if (array_key_exists($groupaddr, $sniffed)) {
        $decimal = hexdec($hexa);
        $value = dptSelectDecode($sniffed[$groupaddr]['dpt'], $decimal);
        //ecriture en base si changement d'etat et bas simplement l'equipement qui redis la meme chose sur le bus
        //System_Daemon::notice("Old Value -> ".$groupaddr.":: ".$oldSniffedValue[$groupaddr]);
        //System_Daemon::notice("New Value -> ".$groupaddr.":: ".$value);
        if ($oldSniffedValue[$groupaddr] != $value) {
            //System_Daemon::notice("MAJ");
            $sniffed[$groupaddr]['value'] = $value;
            makeJsonTrace($sniffed);
            //System_Daemon::notice("TRACKED::".$sniffed[$groupaddr]['is_track']);
            if ($sniffed[$groupaddr]['is_track'] == 1) {
                //Inseetion en base de données car l'eqt is_track=true
开发者ID:stawen,项目名称:domovision,代码行数:31,代码来源:knx-sniffer.php


示例16: generateObjectProgram


//.........这里部分代码省略.........
                     }
                 }
             }
             ++$index;
         }
         // end foreach
         $previousTLINE = 'no_vlaue';
         $opIndex = 0;
         $tIndex = 0;
         foreach ($objectProgram as $_objectProgram) {
             foreach ($_objectProgram['TEXT'] as $_TEXT) {
                 if (!isset($objectProgram[$opIndex]['TRECORD'][$_TEXT['TLINE']])) {
                     $objectProgram[$opIndex]['TRECORD'][$_TEXT['TLINE']]['STARTLOC'] = $_TEXT['LOC'];
                 }
                 if (!isset($objectProgram[$opIndex]['TRECORD'][$_TEXT['TLINE']]['LENGTH'])) {
                     $objectProgram[$opIndex]['TRECORD'][$_TEXT['TLINE']]['LENGTH'] = 0;
                 }
                 $objectProgram[$opIndex]['TRECORD'][$_TEXT['TLINE']]['LENGTH'] += $_TEXT['SIZE'];
             }
             ++$opIndex;
             $previousTLINE = 'no_vlaue';
         }
         // end foreach
         // fix some unique bug literal loc missing // only for this figure only= =..
         $index = 0;
         $lastELOC = 'no_value';
         foreach ($this->OPTB_WOC as $_OPTB) {
             if (isset($_OPTB['LABEL'])) {
                 if (!empty($_OPTB['ELOC'])) {
                     $lastELOC = $_OPTB['ELOC'];
                 }
                 if ($_OPTB['LABEL'] == '*') {
                     if ($_OPTB['OPCODE'][1] == 'C') {
                         $size = strlen(get_string_between($_OPTB['OPCODE'], "'", "'"));
                     } else {
                         if ($_OPTB['OPCODE'][1] == 'X') {
                             $size = strlen(get_string_between($_OPTB['OPCODE'], "'", "'")) / 2;
                             if ($size == 0.5) {
                                 $size = 1;
                             }
                         }
                     }
                     $this->OPTB_WOC[$index]['LOC'] = $lastELOC;
                     $this->OPTB_WOC[$index]['SIZE'] = $size;
                     $newELOC = hexdec($lastELOC) + $size;
                     $this->OPTB_WOC[$index]['ELOC'] = sprintf("%04X", $newELOC);
                     $lastELOC = $this->OPTB_WOC[$index]['ELOC'];
                 }
             }
             ++$index;
         }
         // end foreach
         print_r_to_html(RESULT_PATH . '/' . $OUTPUT_LOG_PREFIX . 'fixedOPTB.html', $this->OPTB_WOC);
         $maxSection = max(array_column($this->OPTB_WOC, 'SECTION'));
         for ($i = 0; $i <= $maxSection; $i++) {
             $tmpOPTB = $this->optb_woc_filter('SECTION', $i);
             $maxLoc = max(array_column($tmpOPTB, 'ELOC'));
             //$minLoc = min(array_column($tmpOPTB, 'LOC'));
             $minLoc = array_column($tmpOPTB, 'LOC')[0];
             $objectProgram[$i]['LENGTH'] = hexdec($maxLoc) - hexdec($minLoc);
             $objectProgram[$i]['LENGTH'] = sprintf('%06X', $objectProgram[$i]['LENGTH']);
             $objectProgram[$i]['STARTLOC'] = $minLoc;
             $objectProgram[$i]['ENDLOC'] = $maxLoc;
         }
         print_r_to_html(RESULT_PATH . '/' . $OUTPUT_LOG_PREFIX . 'objectprogramArray.html', $objectProgram);
         $content = '';
开发者ID:BrokenPen,项目名称:SIC-XE-Assembler,代码行数:67,代码来源:GenerateObjectProgram.php


示例17: file_get_contents

<?php

$url = "http://www.registrar.ucla.edu/schedule/detselect.aspx?termsel=15F&subareasel=COM+SCI&idxcrs=0033++++";
$output = file_get_contents($url);
strip_tags($output);
$output = get_string_between("{$output}", 'Textbooks', 'About Us');
$output = preg_replace("/<img[^>]+\\>/i", "", $output);
echo $output;
function get_string_between($string, $start, $end)
{
    $string = " " . $string;
    $ini = strpos($string, $start);
    if ($ini == 0) {
        return "";
    }
    $ini += strlen($start);
    $len = strpos($string, $end, $ini) - $ini;
    return substr($string, $ini, $len);
}
开发者ID:jayendrajog,项目名称:bruintime,代码行数:19,代码来源:classScraper.php


示例18: file_get_html

<?php

$dealpageArray[url] = "http://livingsocial.com/deals?preferred_city=4";
$html = file_get_html($dealpageArray[url]);
$dealpageArray[title] = $html->find('title', 0)->innertext;
$dealpageArray[img_url] = $html->find('div.grid_5', 0)->style;
$dealpageArray[img_url] = get_string_between($dealpageArray[img_url], "url(", ")");
$dealpageArray[price] = numberOnly($html->find('div.deal-price', 0)->plaintext);
$dealpageArray[value] = str_replace("\$", "", $html->find('span.value-unit strong', 0)->innertext);
$dealpageArray[expires] = strtotime('midnight + 5 hours');
$dealpageArray[source_id] = "4";
$dealpageArray[region_id] = "6";
$siteArray[] = $dealpageArray;
echo '<pre>';
print_r($siteArray);
echo '</pre>';
开发者ID:jamesming,项目名称:find-my-monkey,代码行数:16,代码来源:livingsocial.php


示例19: getPlaylist

function getPlaylist($parameter)
{
    //retrait du parametre u pour réduire la taille du buffer
    $request = $_SESSION['mac'] . " status 0 10000 playlist_id:{$parameter} tags:agl\n";
    //echo "contenu requete getPlaylsit: $request";
    $mySqueezeCLI = new SqueezeCLI($request);
    $response = $mySqueezeCLI->receiveCLI();
    //echo "la reponse brut: $response \n";
    $response = decodeAscii($response);
    $indexPlaylist = split("playlist index:", $response);
    array_shift($indexPlaylist);
    //Clear de la variable de SESSION
    clearPlaylist();
    foreach ($indexPlaylist as $key => $value) {
        $id = get_string_between($indexPlaylist[$key], "id:", " title");
        $title = get_string_between($indexPlaylist[$key], "title:", " artist:");
        $artist = get_string_between($indexPlaylist[$key], "artist:", " genre:");
        $genre = get_string_between($indexPlaylist[$key], "genre:", " album:");
        $album = get_string_between($indexPlaylist[$key], "album:", " url:");
        $url = substr($indexPlaylist[$key], strrpos($indexPlaylist[$key], " url:"));
        $url = substr($url, 5);
        //echo "contenu de url: $url \n";
        // Attention ici est sauvegardée en session les url des titres de la current playlist, ils seront utilisés pour faire une copie de la playlist
        $_SESSION['currentPlaylist'][$key] = $url;
        echo "<ul class=\"title\" id=\"{$id}\">";
        echo "<li id=\"{$title}\">{$title}</li>";
        echo "<li id=\"{$artist}\">{$artist}</li>";
        echo "<li id=\"{$genre}\">{$genre}</li>";
        echo "<li id=\"{$album}\">{$album}</li>";
        echo "<img class=\"buttonDeleteTitle\" id=\"\" src=\"1_music/view/images/player/delete.png\">";
        echo "</ul>";
    }
}
开发者ID:Heavyshield,项目名称:SDI31,代码行数:33,代码来源:function.php


示例20: strtotime

    $start_date_temp = $dates_dash_sep[0] . ' ' . $year;
    $start_date_temp = strtotime($start_date_temp);
    $start_date = date("m/d/Y", $start_date_temp);
    //echo $start_date;
    // end date
    $days = $total_number_night + 1;
    $stop_date = date('m/d/Y"', strtotime($start_date . ' +' . $total_number_night . ' day'));
    //print_r($dates_dash_sep);
    $t_name = get_string_between($email_body, 'Traveler name', 'Contact info');
    $t_name = trim($t_name);
    $t_name_array = explode(" ", $t_name);
    $fname = $t_name_array[0];
    $lname = $t_name_array[1];
    //Guest Count
    //i.e 20 adults, 0 children
    $guest_html_line = get_string_between($email_body, 'Guests', 'Traveler name');
    $guest_html_line_array = explode(" ", trim($guest_html_line));
    //print_r($guest_html_line_array);exit;
    $guest_html_line_adults = $guest_html_line_array[0];
    $guest_html_line_children = $guest_html_line_array[2];
    $total_guest = $guest_html_line_adults + $guest_html_line_children;
}
//else arrival_flag
$data['property_number'] = $property_id;
$data['start_date'] = $start_date;
$data['stop_date'] = $stop_date;
$data['fname'] = $fname;
$data['lname'] = $lname;
$data['total_guest'] = $total_guest;
//$grandTotal = "0";
$data['grandTotal'] = 0;
开发者ID:sandeepnetwin,项目名称:framework_relay,代码行数:31,代码来源:cost.php



注:本文中的get_string_between函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_string_from_language函数代码示例发布时间:2022-05-15
下一篇:
PHP get_string函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap