Jump to content

Search the Community

Showing results for tags 'stdclass'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. Hi I'm currently connecting to a API to retrieve info. The info I'm retrieving is in the form of Std Class Object. The problem I'm experiencing is that the results I get from one call is limited to 25. They say I should iterate it. But im not sure how to do so. My code so far <html> <?php require_once('MxitAPI.php'); try { $key = '************************'; $secret = '*****************************'; $api = new MxitAPI($key, $secret); if (isset($_GET) && isset($_GET['code'])) { $api->get_user_token($_GET['code'], 'http://********************'); // Get Contacts $contacts = $api->get_contact_list('@Friends', 0, 25); //print_r($contacts); foreach ($contacts->Contacts as $data) { echo $data->DisplayName."<br>"; $invite = $data->UserId; $invite1 = $invite . ','; /* generate the message */ $id = $_SERVER["HTTP_X_MXIT_USERID_R"]; $msg = "Hey! Come join me on {0}! And lets chat like a boss... :-P :-D"; $link = array( array( 'CreateTemporaryContact' => true, 'TargetService' => '********', 'Text' => '*****' ) ); /* send the message */ $api->send_message($id, $invite1, $msg, 'true', $link); } } elseif (isset($_GET) && isset($_GET['error']) && isset($_GET['error_description'])) { echo "<h2>There was an error requesting access from the API</h2>"; echo '<strong>Error:</strong> '. $_GET['error'] .'<br />'; echo '<strong>Error Description:</string> '. $_GET['error_description'] .'<br />'; } else { $api->request_access('***********************', 'graph/read message/user'); } } catch (Exception $e) { echo $e->getMessage(); } ?> <a href="page.php">Back</a> </html> They say I should turn $contacts = $api->get_contact_list('@Friends', 0, 25); into a loop but not sure how to do so the 0 is the files to skip and 25 is the amount to retrieve with each call. they say There is a default page limit of 26, so to access the user's complete contact list you will be iterate this call. More info can be found here regarding the API im trying to use with print_r option my object looks like stdClass Object ( [Contacts] => Array ( [0] => stdClass Object ( [DisplayName] => Zyco [FirstName] => zyco [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426134583000+0200)/ [LastOnline] => /Date(1426139350470+0200)/ [StatusMessage] => ) [UserId] => 0769114834 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [1] => stdClass Object ( [DisplayName] => cobusbo [FirstName] => Cobus [LastName] => Botma [State] => stdClass Object ( [Availability] => 2 [IsOnline] => 1 [LastModified] => /Date(1426162593000+0200)/ [LastOnline] => /Date(1426180367476+0200)/ [Mood] => 0 [StatusMessage] => checkout spamchat ) [UserId] => 27765238453 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [2] => stdClass Object ( [DisplayName] => Bassmaker [FirstName] => Stefan [LastName] => Hattingh [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425535612000+0200)/ [LastOnline] => /Date(1426232999571+0200)/ [StatusMessage] => Lesson learned!!!! Never fall inlove!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ) [UserId] => 27828456765 [Blocked] => [Group] => MXit [ContactType] => 0 [SubscriptionType] => 66 ) [3] => stdClass Object ( [DisplayName] => SHERIFF [FirstName] => ``ॐ☀☺ॐB.I.G5☺™♦.+LIONKIng [LastName] => ँ๏°˚ _♥_☺™♦☀LORDMINATI☀☺™♦๏° [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1420610808000+0200)/ [LastOnline] => /Date(1426171691976+0200)/ [StatusMessage] => #ff425a #ff425aLaVeyan sHaitAn Bible. ) [UserId] => m11231391002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [4] => stdClass Object ( [DisplayName] => HunterPoint. [FirstName] => Caroline [LastName] => Boot [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426227463000+0200)/ [LastOnline] => /Date(1426240850456+0200)/ [StatusMessage] => Friend isn't about who you've know the longest it's about who walked into your life said "I'm here for you" and proved it. ) [UserId] => m18323190002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [5] => stdClass Object ( [DisplayName] => $Sugar$ $Max$ [FirstName] => $sugar$ $max$ [LastName] => Sugar$ $max$ [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425995353000+0200)/ [LastOnline] => /Date(1426237305719+0200)/ [StatusMessage] => ) [UserId] => m19055694002 [Blocked] => [Group] => MXit [ContactType] => 0 [SubscriptionType] => 66 ) [6] => stdClass Object ( [DisplayName] => .-.-.-KID☀BIG [FirstName] => *#c0c00c.+.+.+KID #c0c0c0BIG* [LastName] => *#c0c0c0.+.+.+BUMS#00ff00HAKA* [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1424843034000+0200)/ [LastOnline] => /Date(1425665935177+0200)/ [StatusMessage] => ) [UserId] => m24542119002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [7] => stdClass Object ( [DisplayName] => Kλzεhιτsυjι [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425991633000+0200)/ [LastOnline] => /Date(1425991773513+0200)/ [StatusMessage] => #9966fb phone broken ) [UserId] => m25912500002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [8] => stdClass Object ( [DisplayName] => (H)FATIMA(H) [FirstName] => /#ff0000Fatima/ [LastName] => /#ff0000Japhta/ [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425912639000+0200)/ [LastOnline] => /Date(1426239237672+0200)/ [StatusMessage] => Busy..... Flaming spirit-: SITTER ) [UserId] => m35370741002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [9] => stdClass Object ( [DisplayName] => ��m�H� W�YB�Y [FirstName] => Francois Barnard [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426006669000+0200)/ [LastOnline] => /Date(1426183951042+0200)/ [StatusMessage] => ...... Ķãmãķãżī Wãřłøřđś .... If anyone knows coding pls msg me ... or if u know wapka msg me pls ((( Checkout Extreme_gamers ))) ) [UserId] => m37042581002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [10] => stdClass Object ( [DisplayName] => *#ff0000 #0000ffXena* [FirstName] => Km vnd yt [LastName] => Vra jw nek [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1424576823000+0200)/ [LastOnline] => /Date(1424577160006+0200)/ [StatusMessage] => .+#0000ff ) [UserId] => m40566397002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [11] => stdClass Object ( [DisplayName] => {{*BL!TZKR!3G#]] [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425809938000+0200)/ [LastOnline] => /Date(1425818270545+0200)/ [StatusMessage] => Cheers Galaxy Wars. ) [UserId] => m41544489002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [12] => stdClass Object ( [DisplayName] => Lord of chaose [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426188520000+0200)/ [LastOnline] => /Date(1426224169262+0200)/ [StatusMessage] => ) [UserId] => m42930422002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [13] => stdClass Object ( [DisplayName] => Morning-staR• [FirstName] => Apocalypse [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426016522000+0200)/ [LastOnline] => /Date(1426236913282+0200)/ [StatusMessage] => D.N.A femceE's Crew be Making a one hella sick tour around DBN. Lol err don't even ask about the Males Crew but i'm happy for all my gals daddy cant wait for ya'll to come back so we can start eating some MoOLa(((LMAO))) ) [UserId] => m43239048002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [14] => stdClass Object ( [DisplayName] => #Ff0000*.+.+.+©£MP£ROR©#Ff0000*.+.+.+ [FirstName] => #Ff0000*.+.+JUMONG#Ff0000*.+.+ [LastName] => #cc00cc*.+.+DYNA§TY#Ff0000*.+.+ [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1421736155000+0200)/ [LastOnline] => /Date(1426225275110+0200)/ [StatusMessage] => #ff00ff®eally.. Visit my download portal- VENTRICK | Home Of Downloads Remember d sabbath dat 2 kip it holy. I can do all tins 2ru christ which streghteneth me! ) [UserId] => m46623264004 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [15] => stdClass Object ( [DisplayName] => kira [FirstName] => Kira [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426111312000+0200)/ [LastOnline] => /Date(1426231189633+0200)/ [StatusMessage] => Havent! ) [UserId] => m48340699002 [Blocked] => [Group] => MXit [ContactType] => 0 [SubscriptionType] => 66 ) [16] => stdClass Object ( [DisplayName] => DEATHANGEL [FirstName] => DEATH [LastName] => ANGEL [State] => stdClass Object ( [Availability] => 3 [IsOnline] => 1 [LastModified] => /Date(1426239062000+0200)/ [LastOnline] => /Date(1426239536392+0200)/ [Mood] => 1 [StatusMessage] => ) [UserId] => m49191486002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [17] => stdClass Object ( [DisplayName] => Shadow Reaper [FirstName] => dont [LastName] => know [State] => stdClass Object ( [Availability] => 1 [IsOnline] => 1 [LastModified] => /Date(1426189573000+0200)/ [LastOnline] => /Date(1426237783400+0200)/ [Mood] => 6 [StatusMessage] => Leave me alone not in the mood...tik verby ) [UserId] => m51256041002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [18] => stdClass Object ( [DisplayName] => 《■□●◆8-)¿¥¤UNG §K@T£R¿8-)●■●♧》 [FirstName] => #fe333d??? [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425840233000+0200)/ [LastOnline] => /Date(1425126238187+0200)/ [StatusMessage] => #669966 ) [UserId] => m52626156002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [19] => stdClass Object ( [DisplayName] => .+_*#ffff00ICON*_ [FirstName] => .+*MCKINGO #ffff00 [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1424897461000+0200)/ [LastOnline] => /Date(1425331624085+0200)/ [StatusMessage] => THE ICON NOT AND NEVER WILL BE XCON.AM THE APEX OF APEX PREDATORS ) [UserId] => m56408943004 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [20] => stdClass Object ( [DisplayName] => *N-R* [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1424209196000+0200)/ [LastOnline] => /Date(1426181775833+0200)/ [StatusMessage] => ) [UserId] => m58722247002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [21] => stdClass Object ( [DisplayName] => ZIYAD [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426097756000+0200)/ [LastOnline] => /Date(1426182338901+0200)/ [StatusMessage] => I'm not here right now ) [UserId] => m60626483002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [22] => stdClass Object ( [DisplayName] => king•othello [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1426175909000+0200)/ [LastOnline] => /Date(1426176930152+0200)/ [StatusMessage] => ) [UserId] => m61831903002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [23] => stdClass Object ( [DisplayName] => #c0c00c.+.+.+*Mxit hacker* [FirstName] => $Mxit hacker$ [LastName] => $Mxit hacker$ [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1423285744000+0200)/ [LastOnline] => /Date(1423285748616+0200)/ [StatusMessage] => 2015 comes with new cheat tricks tht i created [Image] [Image] ) [UserId] => m62798876002 [Blocked] => [Group] => MXit [ContactType] => 0 [SubscriptionType] => 66 ) [24] => stdClass Object ( [DisplayName] => james basson [FirstName] => [LastName] => [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1425222833000+0200)/ [LastOnline] => /Date(1425224038803+0200)/ [StatusMessage] => ¿Grim Give¿ ) [UserId] => m63089464002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) [25] => stdClass Object ( [DisplayName] => Kizer Dengram [FirstName] => Clinton [LastName] => Ifeanyichukwu [State] => stdClass Object ( [Availability] => 4 [IsOnline] => [LastModified] => /Date(1424621304000+0200)/ [LastOnline] => /Date(1426236525690+0200)/ [StatusMessage] => Ooh Lord My havenly father, as i arrange my wonderful bed (Future) so i will lie on it... But lord as i am part of your family, please lord come and help me to arrange my Bed (My Future) coz only me cant arrange a whole wide Bed, for fear of Wolves! Amen! ) [UserId] => m63748006002 [Blocked] => [Group] => Galaxy Universe Admin [ContactType] => 0 [SubscriptionType] => 66 ) ) ) this is only the first 26 people info on my contact list I need to get a way to iterate it when the call is done with the first 26 to move on to the next 26. and then the next 26 etc. I looked at $contacts = $api->get_contact_list('@Friends', 0, 25) and saw the 0 for skipped items and 25 for page limit. is there maybe a way to create a loop to say with the first call skip 0 with the second recall skip the first 25 and with 3rd recall skip the first 50 till its done...
  2. Hi. I would like to build a complex data structure in a foreach bucle and return it after foreach ($array as $row) { // Here we get groupname and item_info for each row. } I want an array of groups(stdClass). Each group has info, and a list of items(stdClass). array( stdClass Group_1 ( info list = array ( stdClass item_1 ( info ) stdClass item_2 (..) ... ) ) ... stdClass Group_n (...) ) Any help to build this would be apreciated. Thank you.
  3. Hi, i'm using SoapClient. i want to save result of SoapClient to a mysql database. my php code for webservice: $client = new SoapClient("http://sms-webservice.ir/v1/v1.asmx?wsdl"); $params = array( 'Username'=>$username, 'PassWord'=>$password, 'numberOfMessages'=>$numberOfMessages, 'destNumber'=>$destNumber, 'ErrNum'=>$ErrNum, ); $result = $client->GetAllMessages( $params ); if (is_soap_fault($result)) { echo '<h2>Fault:</h2><pre>'; print_r($result); echo '</pre>'; } else { $res = $result->GetAllMessagesResult->ArrayOfString; echo "<div dir=ltr>"; foreach($res as $key => $value){ print_r ($value); //$MyResult = ew_Execute("INSERT INTO receivedsms (MessageID, ReceiverNumber, SenderNumber, MessageTxt, ReceiveDate) VALUES ('', '', '', '', '')"); } echo "</div>"; //end get messages } my SoapClient results return the following data: stdClass Object ( [string] => Array ( [0] => 32979916 [1] => 5000206060500 [2] => 9140544602 [3] => A [4] => 10/16/2013 11:13:03 PM ) ) stdClass Object ( [string] => Array ( [0] => 32979917 [1] => 5000206060500 [2] => 9140544602 [3] => B [4] => 10/16/2013 11:13:13 PM ) ) stdClass Object ( [string] => Array ( [0] => 32979923 [1] => 5000206060500 [2] => 9140544602 [3] => C [4] => 10/16/2013 11:13:23 PM ) ) Please help me complete my code to save the soapclient results to mysql table! Regards Mansour
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.