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($ch, CURLOPT_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>
Re: Fetching from textarea into array PHP
Why don't you just explode the $_GET or $_POST of the textarea by line return?