Merhaba Arkadaşlar
1
| ?> |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| function string_getInsertedString($long_string,$short_string,$is_html=false){ if($short_string>=strlen($long_string))return false; $insertion_length=strlen($long_string)-strlen($short_string); for($i=0;$i< strlen ($short_string);++$i){ if($long_string[$i]!=$short_string[$i])break; } $ inserted_string = substr ($long_string,$i,$insertion_length); if($is_html && $inserted_string[$insertion_length-1]=='<'){ $ inserted_string = '<' .substr($inserted_string,0,$insertion_length-1); } return $inserted_string; } function DOMElement_getOuterHTML($document,$element){ $html=$document->saveHTML(); $element->parentNode->removeChild($element); $html2=$document->saveHTML(); return string_getInsertedString($html,$html2,true); } function displayLatestTweet($twitterID){ include_once(ABSPATH.WPINC.'/rss.php'); $latest_tweet = fetch_rss("http://search.twitter.com/search.atom?q=from:" . $twitterID . "&rpp=1"); echo $latest_tweet->items[0]['atom_content']; } |
1
| <? php displayLatestTweet('salihtoy');?> |
wordpress kategorisine yazı ekle iyi gelir :D
YanıtlaSil