나는 farecompare.com과 같은 항공편/호텔 예약 시스템을 만들고 있습니다. 다른 사이트와 비교하여 Farecompare 값을 파싱하고 다른 사이트도 생성하십시오. 누구든지 내게 그들이 어떻게 그것에 견제를 만들지 말해. 구문 분석 할 수 있지만 세션을 만들 수 없습니다. URL 구문 분석 및 예약 시스템의 세션
public function flight($depart, $return, $from, $to, $type, $class,
$adults, $seniors, $children) {
$dep = explode("/", $depart);
$ret = explode("/", $return);
if ($type == 'RoundTrip') {
$expurl = 'http://www.expedia.co.in/Flights-Search?trip=' .
strtolower($type) . '&leg1=from%3A' . $from .
'%29%2Cto%3A' . $to .
'%29%2Cdeparture%3A' . $dep[1] .
'/'.$dep[0].'/'.$dep[2].
'TANYT&leg2=from%3A' . $to .
'%29%2Cto%3A' . $from .
'%29%2Cdeparture%3A' .
$ret[1].'/'.$ret[0].'/'.$ret[2] .
'TANYT&passengers=children%3A' . $children .
'%2Cadults%3A' . $adults .
'%2Cseniors%3A' . $seniors .
'%2Cinfantinlap%3AY&options=cabinclass%3Aeconomy'.
'%2Cnopenalty%3AN%2Csortby%3Aprice&mode=search';
echo '<a href = "' . $expurl . '" target = "_blank">Expedia</a>';
} else {
$type = 'oneway';
$expurl = 'http://www.expedia.co.in/Flights-Search?trip='.
strtolower($type) . '&leg1=from%3A' . $from .
'%29%2Cto%3A' . $to . '%29%2Cdeparture%3A' .
$dep[1].'/'.$dep[0].'/'.$dep[2] .
'TANYT&passengers=children%3A' . $children .
'%2Cadults%3A' . $adults .
'%2Cseniors%3A' . $seniors .
'%2Cinfantinlap%3AY&options=cabinclass%3Aeconomy'.
'%2Cnopenalty%3AN%2Csortby%3Aprice&mode=search';
echo '<a href = "' . $expurl . '" target = "_blank">Expedia</a>';
}
}
나는 데이터를 얻을 URL을 분석하여 익스 피디아에 근무하지만, 세션을 사용하는 등 cheapoait, 트래블 같은 다른 사이트가 있습니다. 세션을 만드는 방법?
질문을 읽었지만 세션이 다른 사이트 데이터를 자신의 사이트로 구문 분석하거나 달성하려는 작업과 어떤 관련이 있는지 아직도 알 수 없습니다. – mavrosxristoforos
OK, 나는 당신이 달성하고자하는 것을 보았습니다 만, "세션"에 대해 언급하고 있기 때문에 당신의 작업과 관련된 코드를 제공하지 않으므로 혼란스러워집니다. – mavrosxristoforos