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

Related Questions

Here is my function ( updated ): Public Shared Function shortenUrl(ByVal URL As String)
I'm trying to concatenate PHP variables into an onclick function. Here is the line
So what I'm looking for here is something like PHP's print_r function. This is
I'm trying to simply prove here that this simple function isn't good enough to
Im trying to toggle some divs and its not working, here is the js:
I'm trying to delete a li item using jquery, but its not working. Here's
Someone posted a great little function here the other day that separated the full
here is some sample javascript: SomeObjectType = function() { } SomeObjectType.prototype = { field1:
Here's the quick and skinny of my issue: $(a).toggle(function() { /*function A*/ }, function()
What is the function of the namespace here? I would think in this simple

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.