Last active
September 14, 2019 13:54
-
-
Save yusufusta/f020cf9f044cec4a954da2561139e58b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$kelime = "online üniversite"; | |
$kelime = str_replace(" ","+",$kelime); | |
$sayfa = "1"; | |
$eksiurl = "https://eksisozluk.com/?q="; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, ''.$eksiurl.''.$kelime.''); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$a = curl_exec($ch); | |
$url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); | |
$kaynak = file_get_contents(''.$url.'?p='.$sayfa.''); | |
preg_match_all('#<div class="content">(.*?)</div>#si', $kaynak, $entry); | |
preg_match_all('/<a.*class=\"entry-date permalink\".*>(.*)<\/a>/isU', $kaynak, $tarih); | |
preg_match_all('/<a.*class=\"entry-author\".*>(.*)<\/a>/isU', $kaynak, $sahibi); | |
print_r($tarih[1]); | |
print_r($sahibi[1]); | |
print_r($entry[0]); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment