Creating a Site Submit Script

Hi,

I am just wondering, I am thinking of creating a Site Search Submit Script. In other words something where people including myself can go to my website and type in their URL and have it submit it to a list of predefined search engines. Does anyone know if this can be done and how hard is it to do.

Kind Regards,
CompTeck2255
CompTeck2255Asked:
Who is Participating?
 
BarsMonsterCommented:
You need to figure out submission urls and duplicate this line with different submission urls:

 file_content("http://www.coolsearchengine.com?site_to_add=".$_POST["user_entered_url"]);
0
 
BarsMonsterCommented:
It is not hard at all. You need to know URL which does to work. For example:

http://www.coolsearchengine.com?site_to_add=Your_site

To automatically submit to this site in PHP, you may do:

file_content("http://www.coolsearchengine.com?site_to_add=".$_POST["user_entered_url"]);

That's it. Posting data via POST is a little harder but still easy (see CURL library)
0
 
CompTeck2255Author Commented:
Hi, BarsMonster

Thanks for the quick reply. This is great information how would I get this onto my server to display it to the end user.

Kind Regards,
CompTeck2255
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
BarsMonsterCommented:
Here is the mockup. Anyway, you should know PHP to customize it and make it work in your environment.

<h1>Submit your site to all known search engines</h1>
<form method="post" action="">
<input type="text" name="user_entered_url">
<input type="Submit">
</form>
<?
  if(isset($_POST["user_entered_url"]))
  {
   file_content("http://www.coolsearchengine.com?site_to_add=".$_POST["user_entered_url"]);
header("Location: /site_submitted.php");
exit;
}
?>
0
 
CompTeck2255Author Commented:
Ok greats thanks, Now that will submit the website that they enter in to the Search Engines that I input correct? If so how can I add more to it.

Thanks :)
0
 
CompTeck2255Author Commented:
Great, Thanks for you help on this matter, I shall get back to you if I have any issues.
0
 
CompTeck2255Author Commented:
Hi,

I seem to be getting this error when I enter in a url like http://site.com.au 

Fatal error: Call to undefined function file_content() in /home/eva50119/public_html/new 2.php on line 16

Any ideas
0
 
BarsMonsterCommented:
Sorry, correct name is file_get_content :-)
0
 
CompTeck2255Author Commented:
Hi

This is the code that I have so far. But I am still getting this error
Fatal error: Call to undefined function file_get_content() in /home/eva50119/public_html/new 2.php on line 16

Do you know what is causing this. Will this work as Google and the other ones that I hope to use all use CAPTURA Verification before you can submit it.

Kind Regards,
CompTeck2255


<h1>Submit your site to all known search engines</h1>
<form method="post" action="">
<input type="text" name="user_entered_url">
<input type="Submit">
</form>
<?
 if(isset($_POST["user_entered_url"]))
 {
file_get_content("http://www.google.com/addurl/?continue=/addurl".$_POST["user_entered_url"]);
header("Location: /site_submitted.php");
exit;
}
?>

Open in new window

0
 
CompTeck2255Author Commented:
Sorry above there is no line 16 that is because I had some other customizations to it in there the file has now been reuploaded without the modifications now here is the new line.

Fatal error: Call to undefined function file_get_content() in /home/eva50119/public_html/new 2.php on line 9
0
 
BarsMonsterCommented:
Try latest PHP, probably yours is older than 4.3 or url_fopen is restricted (many shared hosting companies restrict external calls).

For captcha - check recaptcha.com, also you may find examples of integrating captcha in google, they are not that small to write here :-)

0
 
CompTeck2255Author Commented:
Hi,

Thanks for the help. It was much appreciated :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.