• 25-06-2013, 12:46:14
    #1
    Üyeliği durduruldu
    Merhaba arkadaşlar ..
    Yakında çıkaracağım portal temam için sidebarda bir astroloji bölümü oluşturdum.

    İconları hazır.
    İconların üzerine tıklanıldığı zaman bir popup ekranı çıkıyor ve verileri oraya yazdıracağız .

    Bakınız ..

    Css yapısı bu şekilde.
    Sadece sizden istediğim o butona basıldığında bir siteden php yöntemi ile burçları web sitesinin içerisinde görüntülenmesini sağlamak.
    Jquery Lightbox özelliğie şu anda aktiftir.

    Bakınız ..

    Veriyi çekeceksiniz ve ekrana yazdıracaksınız.
    Ücretli / ücretsiz yol yoldam bilmiyorum yardımcı olabilecek arkadaş varsa şimdiden Allah razı olsun. Ücretli olarak pek birşey veremem zaten yapılacak işte ortadadır ..

    Ücretsiz varsa buna uyarlayabilirseniz çok memnun olurum.
    Teşekkürler, saygılarımla ..
  • 25-06-2013, 14:50:22
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <?php
    	# Sınıfı dahil ettik.
    	require('class.saintx.php');
    	# Nesnemizi oluşturduk.
    	$SAINTX = new SAINTX();
    	# "Koç" burcuna ait yorumu getirmesini söyledik.
    	$horoscope_comment = $SAINTX->getHoroscopeComment('koc');
    	# Yorumu ekrana yazdırdık.
    	echo $horoscope_comment;
    ?>
    class.saintx.php dosyası;
    <?php
    	
    	/* 
    	 * SAINTX > POSTA.COM.TR Astroloji Botu
    	 * 
    	 * @author: SAINTX
    	 * @web: http://saintx.net
    	 * @mail: im@saintx.net
    	 * @date: 25.06.2013
    	 */
    	
    	class SAINTX {
    		const AUTHOR = 'SAINTX';
    		const POSTA_COM_TR_ASTROLOJI_SERVICE_URL = 'http://www.posta.com.tr/astroloji';
    		
    		public $horoscopes = array('koc', 'boga', 'ikizler', 'yengec', 'aslan', 'basak', 'terazi', 'akrep', 'yay', 'oglak', 'kova', 'balik');
    		public $current_horoscope = null;
    		public $horoscope_comments = array();
    		public $posta_com_tr_request_uri = null;
    		public $posta_com_tr_request_uri_query_string = null;
    		
    		const REGEX_1 = '#<p\sclass="ozet">(.*?)<\/p>#si';
    		
    		public function __construct() {
    			$this->getHoroscopeComments();
    		}
    		
    		public function buildRequestQueryString() {
    			$this->posta_com_tr_request_uri_query_string = DIRECTORY_SEPARATOR.$this->current_horoscope.DIRECTORY_SEPARATOR;
    			
    			return $this->posta_com_tr_request_uri_query_string;
    		}
    		
    		public function buildRequestURI() {
    			$this->posta_com_tr_request_uri = static::POSTA_COM_TR_ASTROLOJI_SERVICE_URL.$this->posta_com_tr_request_uri_query_string;
    			
    			return $this->posta_com_tr_request_uri;
    		}
    		
    		public function setCurrentHoroscope($horoscope) {
    			$this->current_horoscope = $horoscope;
    		}
    		
    		public function getRequestURI() {
    			return $this->posta_com_tr_request_uri;
    		}
    		
    		public function getHoroscopeComments() {
    			foreach($this->horoscopes as $horoscope) {
    				$this->setCurrentHoroscope($horoscope);
    				$this->buildRequestQueryString();
    				$this->buildRequestURI();
    				$html = $this->html($this->getRequestURI());
    				$horoscope_comment = preg_match(static::REGEX_1, $html, $matches) ? end($matches) : '';
    				$this->horoscope_comments[$horoscope] = $horoscope_comment;
    			}
    		}
    		
    		public function getHoroscopeComment($horoscope) {
    			return $this->horoscope_comments[$horoscope];
    		}
    		
    		public function html($url, $iconv=false, $iconv_in_charset='', $iconv_out_charset='') {
    			return ($iconv) ? iconv($iconv_in_charset, $iconv_out_charset, @file_get_contents($url)) : @file_get_contents($url);
    		}
    	}
    	
    ?>