PHP Fetching from textarea into array PHP
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Fetching from textarea into array PHP

  1. #1
    Join Date
    Aug 2014
    Posts
    1

    Fetching from textarea into array PHP

    Hello, iam almost done with my project .. except there is one more thing left which somehow i cant manage to figure it out....... i manged to make a proxy array which rotates proxies randomly on every try..... but i want for my users to be able to add them manually via the textarea... so they put their proxies and
    as much as they want...... so then i gues explode should be used to fetch the proxies that were added by the user from the textarea and put them in an array like u see down and then with the curl array_rand it randomises them on evry try The real problem is i dnt know how to indetidy the explode cause iam not adding them manually they will be added via textare by users....... so when they add the ips they need to be fetched from the textare.
    THNX IN ADVACE


    PHP Code:
    $proxies = array( 
        
    '000.000.000.00:000'
        
    '000.000.000.00:000'
        
    '000.000.000.00:000'
        
    '000.000.000.00:000'

    ); 
    curl_setopt($chCURLOPT_PROXY,$proxies[array_rand($proxies)]); 

    <
    textarea cols='22' class='area' rows='14' name='proxies'>PROXIES</textarea><br><input type='submit' value='Test'><br></p><p align='center' dir='ltr'><b

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,879

    Re: Fetching from textarea into array PHP

    Why don't you just explode the $_GET or $_POST of the textarea by line return?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center