Jump to content

Recommended Posts

this the code for a webpage
/////////////////////////////////////////////////////////////////////////////////
<HTML> 
<HEAD>
  <TITLE>Plz Help</TITLE>
</head>

<BODY bgcolor="ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<FORM METHOD="POST" ACTION="send.php" name="form_act" onSubmit="return check_email(this);" enctype="multipart/form-data">
<INPUT type = "hidden" name = "typ_act_e" value="e_mail">
<INPUT type = "hidden" name = "typ_act_f" value="csv_file">
<INPUT type = "hidden" name = "redirect_url" value="http://www.somesite.com/somepagehtml">
<INPUT type = "hidden" name = "direct_file" value="Beta_Test_Signup">
<INPUT type = "hidden" name = "direct_email" value="someone@somesite.com">
<INPUT type = "hidden" name = "subject" value="Registration from someOne">
<INPUT type = "hidden" name = "ip" value="192.168.192.24">


<table width=100% cellpadding=8 cellspacing=0 border=0 bgcolor=eeeeee><tr><td valign=top><BR>
<table width=300 cellpadding=2 cellspacing=2 border=0><tr><td valign=top>

<font size=2>Full Name*</td><td><INPUT type="text" style='width:170' name="text0" id="text0"></td></tr><tr><td>

<font size=2>Email*</td><td><INPUT type="text"  style='width:170'  name="s_email0" id="s_email0"></td></tr><tr><td>

<font size=2>Country*</td><td><INPUT type="text" style='width:170'  name="text1" id="text1"></td></tr><tr><td>

<font size=2>Occupation*</td><td><INPUT type="text" style='width:170'  name="text2" id="text2"></td></tr><tr><td>

<font size=2>Main Interest*</td><td><select size="1" name="interest" id="interest">
<option value="Arts">Please Select ></option>
<option value="Arts">Arts</option>
<option value="Film Making">Film Making</option>
<option value="Animation">Animation</option>
<option value="Movies">Movies</option>
<option value="Music">Music</option>
<option value="Videos">Videos</option>
<option value="Writing">Writing</option>
<option value="Photography">Photography</option>
<option value="Cartoons">Cartoons</option>
<option value="Cinematography">Cinematography</option>
<option value="Directing">Directing</option>
<option value="Photography">3D</option>
<option value="Photography">Photography</option>
<option value="Networking">Networking</option>
<option value="Other">Other</option></select></td></tr><tr><td>



<font size=2>Do you use:*</td><td><select size="1" name="use" id="use">
<option value="Yahoo360">Yahoo360</option>
<option value="YouTube">YouTube</option>
<option value="MySpace">MySpace</option>
<option value="Bebo">Bebo</option>
<option value="Orkut">Orkut</option>
<option value="Friend Finder">Friend Finder</option>
<option value="Facebook">Facebook</option>
<option value="Other">Other</option>
<option value="Other">None</option></select></td></tr><tr><td>

<font size=2>Your Comments</td><td><TEXTAREA name="comments" id="comments" COLS=22 ROWS=2></textarea>

</td></tr></table>

<BR><BR><BR><BR><BR><center>
<INPUT class=button1 type ="submit" name = "action" value = "Send Registration" onClick="exit=false"><BR><BR>



<INPUT type= "hidden" name = "requ" id = "requ" value = "|,|Name||text0|,|Email Address||s_email0|,|Country||text1|,|Occupation||text2|,|Main Interest||interest">
<INPUT type= "hidden" name="all_name" id="all_name" value = "Name|!|text0|*|Email Address|!|s_email0|*|Country|!|text1|*|Occupation|!|text2|*|Main Interest|!|interest|*|Uses|!|use|*|Comments or Points|!|comments|*|IP Address|!|ip|*|">

<INPUT type="hidden" name="senders_subject" value ="BETA TESTING PROGRAM">
<INPUT type="hidden" name="senders_text" value="
*  *

Thank you for your registration.

We will be in contact soon to give you more information about
the progress and launch of the project, which is visible at
*">

           
</FORM>
</body>
</html>

////////////////////////////////////////////////////////////////////////////////


what i need to do is to enter a massive amount of data in this site from a comma delimeted file. now i have entered about 100 data. but its taking too  long. so i need to some how automate it. so that the program reads data from a file and send them to the website......


plz help..... very very urgent

as i have a very short left to finish my work.....


Link to comment
https://forums.phpfreaks.com/topic/36293-urgent-urgent-help-needed/
Share on other sites

I am not sure about your question.
you want to enter data in a database from a comma delimeted file.
why don't you do it using the database interface ? (import data)

the other way would be to use php to read your file and make an insert for every row in your comma delimeted file.
sorry don't know how to help you with that.

basically you want a tool where you can spam (no offense intended) a website with data ?
inserting data from your file into a webpage on another server ?

I am not saying you are a going to use (abuse) it.

anatak
how's your php , faizulbari ?

You'll definately want to do two things,  separate your different registrations from each other and then separate the data for each registration. When confronted with a outside form, you can still submit to the post handler after writing your own form.

:load up the file:
Read and adapt the user scripts from these pages.
[code]<?
$file='/path/to/yourfile.csv';
if(file_exists($file))
  $records=file($file);
else
  echo "I can't find $file";
?>[/code]

:separating records:
Hopefully, each new record is on it's own line. file() as already split them into an array.
[code]
if(is_array($f))
  foreach ($f as $index=>$text)
  {
    $x=explode(',',$text);
    foreach($x as $k=>$temp)
        $x[$k]=trim($temp);

    $parts[]=$x;
  }
[/code]

Now you have an array of arrays.
print_r($parts) to see it.
I imagine it's something like

[code]parts= Array(
                  0 = Array(
                              0=>'blah'
                              1=>'blah'
                              2=>'blah'
                              )
                  1 = Array(
                              0=>'blah'
                              1=>'blah'
                              2=>'blah'
                              )
                )[/code]

I'll leave the rest up to your imagination, but what you could do with this giant array now is use it to create 100 new forms that just need their submit buttons touched. Or, and I like this one, make a page that has 100 forms (hidden text of course) and 100 submit buttons. In 100 clicks, yer done.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.