Hi,
I am trying to create a page where:
a user can enter domains which he want to resolve.
for an instance say:
user1 enters
yahoo.com
google.com
msn.com
nbsc.com
The script should accept this domains may be in array and then resolve one by one may be in a frame.
Can any one help me how to start with this.
Some help on PHP code
Moderator: General Moderators
Re: Some help on PHP code
Moving to PHP -Code forum.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Some help on PHP code
What do you mean by 'resolve'? Get the IP address?
The first hurdle will be getting them into an array, which is easy. Use HTML arrays to name your textfields:
All of these values will then populate the $_POST array:
The first hurdle will be getting them into an array, which is easy. Use HTML arrays to name your textfields:
Code: Select all
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
URL: <input type="text" name="url[]" /><br />
...
Code: Select all
echo '<pre>'.print_r($_POST, true).'</pre>';
/* Produces something like:
Array(
[0] => google.com
[1] => yahoo.com
[2] => overture.com
)
Re: Some help on PHP code
i am not sure if i understood the code.
Wht i want is i want to rotate the domains the way they are entered
..
for eg.
yahoo.com ...then google.com etc
should resolved after a specific time.
Wht i want is i want to rotate the domains the way they are entered
..
for eg.
yahoo.com ...then google.com etc
should resolved after a specific time.
Re: Some help on PHP code
I'm not sure what you mean. You'll have to be a little bit more clear
Re: Some help on PHP code
take a look at the below code:
The url enter are explicitly used.
I want to know is it possible to let user choose the domain he want to resolve.
The below code is javascript.
So do you know if the above objective can be achieved in PHP
Thankyou for the help
The url enter are explicitly used.
I want to know is it possible to let user choose the domain he want to resolve.
The below code is javascript.
So do you know if the above objective can be achieved in PHP
Thankyou for the help
Code: Select all
<SCRIPT language="JAVASCRIPT">
var Win;
var page_index=0;
var page = new Array();
page[0] = "http://mail.yahoo.com/";
page[1] = "http://www.daniweb.com/";
page[2] = "http://www.dutchfightclub.nl/";
page[3] = "http://www.dabs.com/";
page[4] = "http://www.lowestonweb.com/";
page[5] = "http://www.vantecusa.com/";
function next_page()
{
page_index++;
if (page_index == 6)
page_index = 0;
Win.location.replace(page[page_index]);
}
</SCRIPT>
</head>
<body>
<h1>Auto Start Page Rotator</h1>
<SCRIPT language="JAVASCRIPT">
Win=window.open(page[0], 'Win','resize=yes,toolbar=yes,status=yes,scrollbars=yes,screenX=0,screenY=0,width=1000,height=666')
setInterval("next_page();",8000);
</SCRIPT>
<input type="text" name="url[]" /><br />
</body>
Last edited by Benjamin on Mon Jun 08, 2009 10:39 am, edited 1 time in total.
Reason: Added [code=html] tags.
Reason: Added [code=html] tags.