Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|
- PiNTEREST GET USER iTEMS
- */
- function pinterest_get_user_items($user)
- {
- function get_img($y, $i)
- {
- $x = explode('img src="', $y);
- $x = explode('"', $x[$i]);
- $x = $x[0];
- return $x;
- }
- function get_title($y, $i)
- {
- $x = explode('<title>', $y);
- $x = explode('</title>', $x[$i + 1]);
- $x = $x[0];
- return $x;
- }
- function get_desc($y, $i)
- {
- $x = explode('></a></p><p>', $y);
- $x = explode('</p></description>', $x[$i]);
- $x = $x[0];
- return $x;
- }
- $url = "http://pinterest.com/" . $user . "/feed.rss";
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $userAgent = '[Pinterest BOT/sCRiPTz-TEAM.iNFO;]';
- curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
- curl_setopt($ch, CURLOPT_FAILONERROR, true);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_AUTOREFERER, true);
- curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
- $content = curl_exec($ch);
- curl_close($ch);
- $count = substr_count($content, 'img src="');
- for ($i = 1; $i <= $count; $i++) {
- $x = get_img($content, $i);
- $y = get_title($content, $i);
- $z = get_desc($content, $i);
- echo "TiTLE: " . $y . "<br/>";
- echo "iMAGE: " . str_replace("_b", "", $x) . "<br/>";
- echo "DESC: " . $z . "<br/><br/><br/>";
- }
- }
- echo pinterest_get_user_items("iconeselesse");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement