Hey all,
Sorry about this.
I have a few functions I want to use to get data from a website throught a form like get meta tags. I want to then put that into mysql.
This is the function it is in a functions.php file which I am inculding in the script itself.
function get_meta_tags($s){
while($s = strstr($s,"<meta")) {
$pos_close = strpos($s,">") + 1;
$array[] = substr( $s , 0 , $pos_close );
$s=substr( $s , $pos_close );
}
for($i=0;$i<count($array);$i++) {
eregi('<meta +(name|httpd-equiv|http-equiv) = "?([">])"? +content = "?([">])[>]*>',$array[$i],$r);
$meta[strtolower($r[2])] = $r[3];
}
return $meta;
} // end function get_meta_tags
Form code etc.
How would I do this.
<form name="form1" method="post" action="">
<span class="righttitle">Site To Spider :</span>
<input type="text" name="site">
<br>
<br>
<input type="submit" name="Submit" value="Spider">
</form>
</div>
</td>
</tr>
</table>
<?
include("config.php");
include("functions.php");
if (isset($submit))
echo get_meta_tags ($site)
?>
how do I use a function like that ? I know this is wrong .. echo get_meta_tags ($site)
what would I do to set it like get_meta_tags ($site) = $meta or something so it gets them then sets them as meta or something.. I dont really know how to go about it so I can get them and insert into mysql..
I know mysql commands ok but need to know hopw to get it to a variable so I can add it in there.
Thanks, and sorry for my lack of PHP skills.