zencms Posted February 3, 2023 Share Posted February 3, 2023 How to get value ip in it? stdClass Object ( [data] => stdClass Object ( [nameservera2] => [ip] => 161.97.168.211 [package] => zencmsco_ge1 [nameserverentry3] => [nameserverentry4] => [nameservera3] => [nameservera4] => [nameserver] => ns100.dichvunull.com [nameserver4] => [nameserverentry2] => [nameserver2] => ns101.dichvunull.com [nameserver3] => [nameservera] => [nameserverentry] => ) [metadata] => stdClass Object ( [result] => 1 [reason] => Account Creation Ok [output] => stdClass Object ( [raw] => Checking input data... Dns Zone check is enabled. Validating Username... ...Done Validating IP... ...Done Validating Contact Email... ...Done ...Done Checking for database conflicts... ...Done Checking for account enhancements... ...Done WWWAcct 12.6.0 (c) 2023 cPanel, L.L.C.... +===================================+ | New Account Info | +===================================+ | Domain: dichvulight.vn | Ip: 161.97.168.211 (n) | HasCgi: y | UserName: dichvulight | PassWord: matkhau123456 | CpanelMod: jupiter | HomeRoot: /home | Quota: 1.000 MB | NameServer1: ns100.dichvunull.com | NameServer2: ns101.dichvunull.com | NameServer3: | NameServer4: | Contact Email: thainguyendvfb@gmail.com | Package: zencmsco_ge1 | Feature List: default | Account Enhancements: None | Language: vi +===================================+ ...Done Custom Account Data Provided: no Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)... Ok ...Done Adding User... Removing Shell Access (n) Success ...Done Adding Entries to userdata... ...Done Setting up Mail & Local Domains... localdomains...valiases ...vdomainaliases ...vfilters ... ...Done Configuring DNS... Zone dichvulight.vn has been successfully added ...Done Verifying MX Records and Setting up Databases... Reconfiguring Mail Routing: LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for dichvulight.vn's mail.: This configuration has been manually selected. ...Done Setting up Service Subdomains... ...Done Updating Authentication Databases... ...Done Setting passwords... ...Done Updating the userdata cache... ...Done Setting up Horde database in the background.... ...Done Creating bandwidth datastore... ...Done Updating the dedicated IP address usage cache... ...Done Generating and installing DKIM keys... ...Done Enabling Apache SpamAssassin™... ...Done Enabling Apache SpamAssassin™ Spam Box... ...Done Sending Account Information... ...Done Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)... Deprecated script ...Done wwwacct creation finished Account Creation Complete!!!... Account Creation Ok ...Done ) [command] => createacct [version] => 1 ) ) Quote Link to comment https://forums.phpfreaks.com/topic/315877-how-to-fetch-the-value-from-stdclass-object/ Share on other sites More sharing options...
Barand Posted February 3, 2023 Share Posted February 3, 2023 Give us something processable, like a json_encode() version of your object, and you are more likely to get help. Quote Link to comment https://forums.phpfreaks.com/topic/315877-how-to-fetch-the-value-from-stdclass-object/#findComment-1605348 Share on other sites More sharing options...
gizmola Posted February 5, 2023 Share Posted February 5, 2023 Assuming you are able to pinpoint the point at which the object is created and you have a variable assigned to it to work with: // Use object attribute access syntax echo $obj->data->ip; Quote Link to comment https://forums.phpfreaks.com/topic/315877-how-to-fetch-the-value-from-stdclass-object/#findComment-1605404 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.