Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 519655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:03:49+00:00 2026-05-13T08:03:49+00:00

Here is the function im trying to us, its held in a file called

  • 0

Here is the function im trying to us, its held in a file called function.php

   public function updateProfile($name = null, $email = null, $url = null, $location = null, $description = null)
        {
            // validate parameters
            if($name === null && $email === null && $url === null && $location === null && $description === null) throw new TwitterException('Specify at least one parameter.');
            if($name !== null && strlen($name) > 40) throw new TwitterException('Maximum 40 characters allowed for name.');
            if($email !== null && strlen($email) > 40) throw new TwitterException('Maximum 40 characters allowed for email.');
            if($url !== null && strlen($url) > 100) throw new TwitterException('Maximum 100 characters allowed for url.');
            if($location !== null && strlen($location) > 30) throw new TwitterException('Maximum 30 characters allowed for location.');
            if($description !== null && strlen($description) > 160) throw new TwitterException('Maximum 160 characters allowed for description.');

            // build parameters
            if($name !== null) $aParameters['name'] = (string) $name;
            if($email !== null) $aParameters['email'] = (string) $email;
            if($url !== null) $aParameters['url'] = (string) $url;
            if($location !== null) $aParameters['location'] = (string) $location;
            if($description !== null) $aParameters['description'] = (string) $description;

            // make the call
            $response = $this->doCall('account/update_profile.xml', $aParameters, true);

            // convert into xml-object
            $xml = @simplexml_load_string($response);

            // validate
            if($xml == false) throw new TwitterException('invalid body');

            // return
            return (array) $this->userXMLToArray($xml, true);
        }

In index.php I have:

<php?

require_once("function.php");
$Twitter = new Twitter;

?>

I need to update the profile location?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:03:49+00:00Added an answer on May 13, 2026 at 8:03 am

    Once you require the file, all you need to do is call the function:

    <?php
    require_once("function.php");
    updateProfile("username", "email", "url", "location", "description");
    ?>
    

    However, your function seems to be part of a class – but your example code doesn’t show the class. If it is part of a class, I’ll assume it’s called ‘Twitter’. In that case the code your using is close. It would be along the lines of:

    <?php
    require_once("function.php");
    $Twitter = new Twitter;
    $Twitter->updateProfile("username", "email", "url", "location", "description");
    ?>
    

    Of course the class would have to do some kind of authentication, which the function your posted seems to refer to – $this->doCall(). Again the bulk of the class is missing, so this function by itself wouldn’t do what your looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 278k
  • Answers 278k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer At iPhone SDK 3.x you have to remove the pin… May 13, 2026 at 3:17 pm
  • Editorial Team
    Editorial Team added an answer There are subtle differences, mostly relating to inheritance. When using… May 13, 2026 at 3:17 pm
  • Editorial Team
    Editorial Team added an answer mysqldump --user=username --password=password --default-character-set=latin1 --skip-set-charset dbname > dump.sql sed -r… May 13, 2026 at 3:17 pm

Related Questions

I'm currently in the process of learning ASP MVC and am running into a
I'm trying to select the used range. I get the worksheet's UsedRange, then I
What i'm exactly trying to do is make my script.aculo.us Autocompleter work for my
but I learn programming and after structured programming with Pascal language, I'm beginning to
First off let me apologize to the SO community for coming to you with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.