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

  • SEARCH
  • Home
  • 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 3723494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T06:17:28+00:00 2026-05-19T06:17:28+00:00

I was told I needed to validate the tokens below but I’m not sure

  • 0

I was told I needed to validate the tokens below but I’m not sure where to start. I only have public access to the website I’m pulling the data from. Someone explain to me tokens or give an example to get me moving?

Do I need access to the other server?

function send_CAD($number, $street, $website, $f_opts = true){         
    $year   = date('Y', time());    
    $number = trim($number);
    $street = urlencode(trim($street));
    $post_data = "__EVENTTARGET=&__EVENTARGUMENT=&".
                 "__VIEWSTATE=/wEPD...&" .
                 "__EVENTVALIDATION=/wEWNw...&".
                 "txtAddrNum=$number&listStDir=&";
...
  • 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-19T06:17:29+00:00Added an answer on May 19, 2026 at 6:17 am

    I’m not sure exactly what you’re asking so here’s the answer in both directions:

    If you have a full url that you’re trying to parse, use parse_url:

    $url = 'http://username:password@hostname/path?arg=value#anchor';
    
    print_r(parse_url($url));
    
    echo parse_url($url, PHP_URL_PATH);
    

    The above example will output:

    Array
    (
        [scheme] => http
        [host] => hostname
        [user] => username
        [pass] => password
        [path] => /path
        [query] => arg=value
        [fragment] => anchor
    )
    

    If you have only the query part of the url you can use parse_str:

    parse_str($str, $output);
    echo $output['first'];  // value
    echo $output['arr'][0]; // foo bar
    echo $output['arr'][1]; // baz
    

    If you have a url that you’re trying to construct use http_build_query:

    $data = array('foo'=>'bar',
                  'baz'=>'boom',
                  'cow'=>'milk',
                  'php'=>'hypertext processor');
    
    echo http_build_query($data); // foo=bar&baz=boom&cow=milk&php=hypertext+processor
    

    If you need to do validation on the data, once you’ve gotten it, you can use the built in filter_input functions with validation/sanitizing options in PHP:

    https://www.php.net/manual/en/ref.filter.php
    https://www.php.net/manual/en/function.filter-input-array.php

    https://www.php.net/manual/en/filter.filters.validate.php
    https://www.php.net/manual/en/filter.filters.sanitize.php

    Example from filter_validate_array page:

    /* data actually came from POST
    $_POST = array(
        'product_id'    => 'libgd<script>',
        'component'     => '10',
        'versions'      => '2.0.33',
        'testscalar'    => array('2', '23', '10', '12'),
        'testarray'     => '2',
    );
    */
    
    $args = array(
        'product_id'   => FILTER_SANITIZE_ENCODED,
        'component'    => array('filter'    => FILTER_VALIDATE_INT,
                                'flags'     => FILTER_REQUIRE_ARRAY, 
                                'options'   => array('min_range' => 1, 'max_range' => 10)
                               ),
        'versions'     => FILTER_SANITIZE_ENCODED,
        'doesnotexist' => FILTER_VALIDATE_INT,
        'testscalar'   => array(
                                'filter' => FILTER_VALIDATE_INT,
                                'flags'  => FILTER_REQUIRE_SCALAR,
                               ),
        'testarray'    => array(
                                'filter' => FILTER_VALIDATE_INT,
                                'flags'  => FILTER_REQUIRE_ARRAY,
                               )
    
    );
    
    $myinputs = filter_input_array(INPUT_POST, $args);
    
    var_dump($myinputs);
    echo "\n";
    

    The above example will output:

    array(6) {
      ["product_id"]=>
          array(1) {
            [0] => string(17) "libgd%3Cscript%3E"
          }
      ["component"]=>
          array(1) {
            [0] => int(10)
          }
      ["versions"]=>
          array(1) {
            [0] => string(6) "2.0.33"
          }
      ["doesnotexist"]=>
          NULL
      ["testscalar"]=>
          bool(false)
      ["testarray"]=>
          array(1) {
            [0] => int(2)
          }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an other question it was told to reload only the needed UITableViewCells instead
Someone told me that openGL is for graphic only, and that it's very bad
I have been told I will be let go at the end of the
If I was told I needed to create a driver for some product (say,
I know this has been asked before but I needed some clarification and confirmation.
I can't see anything on here but I do remember being told that If
I needed to download a file within a python program, someone told me to
OK so I have a mental block when it comes to regex - but
I have been told that Singletons are hard to test. http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/ http://misko.hevery.com/code-reviewers-guide/flaw-brittle-global-state-singletons/ I have
I was told by JL herself I needed to disable lazy loading and remove

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.