PHP Classes

PHP Ask.fm: Retrieve the questions asked to users of Ask.fm

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 162 All time: 8,920 This week: 513Up
Version License PHP version Categories
askfm 1.4Artistic License5PHP 5, Web services, Data types
Description 

Author

This class can retrieve the questions asked to users of Ask.fm.

It sends the HTTP request the Ask.fm site to retrieve the RSS feed of the questions asked to a given user.

The class returns an array of question details that include the question, the answer the date of the question and its page URL on the Ask.fm site.

In Italian:

Questa classe vi permetterą di prelevare le domande di un utente di ask.fm, il social noto come Domanda e rispondi.

Picture of Pasquale Garofalo
Name: Pasquale Garofalo <contact>
Classes: 1 package by
Country: Italy Italy
Age: 26
All time rank: 4246169 in Italy Italy
Week rank: 312 Up14 in Italy Italy Up

Example

<?php

   
/**
    *** @Esempio : Esempio dell'utilizzo della classe ask.class.php
    *** @Autore : Pasquale Garofalo
    *** @Versione: 1.3
    *** @Facebook: https://www.facebook.com/garofalop2012
    **/

require_once('ask.class.php');

$ask = new Ask();

$ask->setUser("GarofaloPasquale");

$count = $ask->countContent();

for(
$i = 0; $i < $count; $i++){
   
$post = $ask->getSingleContent($i);
   
    echo
"<div style='border-bottom:1px solid #cecece;'>
        Domanda: "
.$post['title']." <br />
        Risposta: "
.$post['description']." <br />
    </div>"
;
   
}

if(
$ask->userExist()){
   
   
// Utente esistente / User Exist
   
   
for($i = 0; $i < $count; $i++){
       
$post = $ask->getSingleContent($i);
       
        echo
"<div style='border-bottom:1px solid #cecece;'>
            Domanda: "
.$post['title']." <br />
            Risposta: "
.$post['description']." <br />
            <a target='_blank' href='"
.$post['link']."'>Link</a>
        </div>"
;
    }
   
}else{
    echo
"Utente inesistente";
}



?>


  Files folder image Files  
File Role Description
Plain text file ask.class.php Class Classe di ask.fm
Accessible without login Plain text file esempio.php Example Esempio dell'uso della classe

 Version Control Unique User Downloads Download Rankings  
 0%
Total:162
This week:0
All time:8,920
This week:513Up