'.$contents.''; curl_close($ch); if($contents=="0") { header("Location: http://www.yellowpages.co.th"); }else { $urlWithoutProtocol = str_replace(";", "&", "http://landingpage.yellowpages.co.th/api/checklpbid.php?bid=".$contents); $request = ''; $isRequestHeader = false; $exHeaderInfo = array(); $exHeaderInfo[] = "Content-type: text/xml"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $urlWithoutProtocol); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_HEADER, (($isRequestHeader) ? 1 : 0)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if( is_array($exHeaderInfo) && !empty($exHeaderInfo) ) { curl_setopt($ch, CURLOPT_HTTPHEADER, $exHeaderInfo); } $contxts = curl_exec($ch); curl_close($ch); if(trim($contxts)=="nodata"){ header("Location: http://profile.yellowpages.co.th/".$contents); }else{ header("Location: http://".trim($contxts).".yellowpages.co.th"); } } } else { require ("home.php"); } }else{ require ("home.php"); } ?>