0) { echo''; echo' '; ?> https:/// daily 1.0 $item) { ?> https:/// daily 1.0 query($sql); //while ($string = mysqli_fetch_array($sql)) while($string=$oRs->fetch_array()){?> https://www.lawyersattorneysguide.com/law-office/ daily 0.7 query($sql); //while ($string = mysqli_fetch_array($sql)) while($string=$oRs->fetch_array()){?> https:// weekly 0.5 0 //loading robots.txt with sitemap links if ($load > 0) { //$txtrobots = "# robots.txt\r\n"; //$txtrobots .= "User-agent: *\r\n"; $txtrobots = "# robots.txt\r\n"; $txtrobots .= "User-agent: Googlebot\r\n"; $txtrobots .= "User-agent: Slurp\r\n"; $txtrobots .= "User-agent: msnbot \r\n"; $txtrobots .= "User-agent: Mediapartners-Google*\r\n"; $txtrobots .= "User-agent: Mediapartners-Google\r\n"; $txtrobots .= "User-agent: Googlebot-Image \r\n"; $txtrobots .= "User-agent: Yahoo-MMCrawler\r\n"; $txtrobots .= "User-agent: Adsbot-Google\r\n"; $txtrobots .= "User-agent: *Google*\r\n"; $txtrobots .= "Disallow: \r\n"; $txtrobots .= "\r\n"; $txtrobots .= "User-agent: SemrushBot\r\n"; $txtrobots .= "Disallow: /\r\n"; $txtrobots .= "\r\n"; $txtrobots .= "User-agent: SemrushBot-SA\r\n"; $txtrobots .= "Disallow: /\r\n"; $txtrobots .= "\r\n"; $txtrobots .= "User-agent: *\r\n"; $txtrobots .= "Disallow: /\r\n"; $txtrobots .= "\r\n"; //$sql = $mysqli->query("select count(*) as total from newlistlawyers group by STATE, CITY ", $link); //$string = mysqli_fetch_array($sql); //$tot_rows = $string['total']; //$total = ceil($tot_rows/$per_page); //echo "Pages: ".$total."
"; // for ($i = 1; $i <= $total; $i++) // { // $txtrobots .= "Sitemap: https://". $_SERVER["SERVER_NAME"]. "/sitemap.php?page=".$i."\r\n"; // } $txtrobots .= "Sitemap: https://". $_SERVER["SERVER_NAME"]. "/sitemap.php?page=1\r\n"; $links = array('8111','811104','811105','811107','811120','811145','811149','811153','811154','811155','811156','811157','811158','811159','811160','811161','811162','811163','811164','811165','811166','811167','811168','811169','811170','811171','811172','811173'); foreach ($links as $key => $specialtyID) { if ($specialtyID == '8111' ){ $specialtyDir = "law-office"; $tablelist = "newlistlawyers"; $specialty1 = "Law Office"; $specialty2 = "Lawyers"; $specialty3 = "Attorneys"; $specialty4 = "Law Firms"; } else if ($specialtyID == '811104' ){ $specialtyDir = "immigration-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Immigration Lawyers"; $specialty2 = "Immigration Attorneys"; $specialty3 = "Visa Attorneys"; $specialty4 = "Green Cards & Naturalization"; } else if ($specialtyID == '811105' ){ $specialtyDir = "divorce-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Divorce Lawyers"; $specialty2 = "Divorce Attorneys"; $specialty3 = "Family Law Attorneys"; $specialty4 = "Family Mediation, Custody & Divorce"; } else if ($specialtyID == '811107' ){ $specialtyDir = "criminal-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Criminal Lawyers"; $specialty2 = "Criminal Attorneys"; $specialty3 = "Criminal Defense Lawyers"; $specialty4 = "Aggressive Misdemeanor and Felony Defense Attorneys"; } else if ($specialtyID == '811120' ){ $specialtyDir = "estate-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Estate Lawyers"; $specialty2 = "Estate Attorneys"; $specialty3 = "Trusts & Estates Planning Lawyers"; $specialty4 = "Estate Planning Law Firms"; } else if ($specialtyID == '811145' ){ $specialtyDir = "personal-injury"; $tablelist = "newlistlawyersothers"; $specialty1 = "Personal Injury Lawyers"; $specialty2 = "Personal Injury Attorneys"; $specialty3 = "Accident Attorneys"; $specialty4 = "Auto Accident Lawyers"; } else if ($specialtyID == '811149' ){ $specialtyDir = "medical-malpractrice"; $tablelist = "newlistlawyersothers"; $specialty1 = "Medical Malpractrice Attorneys"; $specialty2 = "Medical Malpractrice Lawyers"; $specialty3 = "Medical Negligence Attorneys"; $specialty4 = "Medical Professional Negligence, Doctor Physician Malpractice, Paralysis & Surgical Injuries"; } else if ($specialtyID == '811153' ){ $specialtyDir = "bankruptcy-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Bankruptcy Lawyers"; $specialty2 = "Bankruptcy Attorneys"; $specialty3 = "Consumer Protection & Debt Negotiation Lawyers"; $specialty4 = "Chapter 7 & 13, Personal Bankruptcy Lawyers"; } else if ($specialtyID == '811154' ){ $specialtyDir = "dui-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "DWI & DUI Attorneys"; $specialty2 = "DWI & DUI Lawyers"; $specialty3 = "Drunk Driving Defense Lawyers"; $specialty4 = "DUI Defense Attorneys"; } else if ($specialtyID == '811155' ){ $specialtyDir = "insurance-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Insurance Claim Attorneys"; $specialty2 = "Insurance Disputes Lawyers"; $specialty3 = "Home & Health Insurance Lawyers"; $specialty4 = "Life Insurance Lawyers"; } else if ($specialtyID == '811156' ){ $specialtyDir = "business-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Business Lawyers"; $specialty2 = "Business Attorneys"; $specialty3 = "Business and Contract Attorneys"; $specialty4 = "Partnerships. Joint Ventures. Contracts. Buying or Selling a Business Lawyers"; } else if ($specialtyID == '811157' ){ $specialtyDir = "auto-accident"; $tablelist = "newlistlawyersothers"; $specialty1 = "Auto Accident Attorneys"; $specialty2 = "Car Accident Lawyers"; $specialty3 = "Auto Accident Injury Claims Attorneys"; $specialty4 = "Personal Injury Lawyers"; } else if ($specialtyID == '811158' ){ $specialtyDir = "child-support-laws"; $tablelist = "newlistlawyersothers"; $specialty1 = "Child Support Lawyers"; $specialty2 = "Child Support Attorneys"; $specialty3 = "Family Law Attorneys"; $specialty4 = "Child Support Rights and Laws"; } else if ($specialtyID == '811159' ){ $specialtyDir = "civil-rights-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Civil Rights Attorneys"; $specialty2 = "Civil Rights Lawyers"; $specialty3 = "Lawyers For Civil Justice"; $specialty4 = "Civil Law Suits Law Lawyers"; } else if ($specialtyID == '811160' ){ $specialtyDir = "workers-compensation-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Workers Compensation Attorneys"; $specialty2 = "Workers' Comp Lawyers"; $specialty3 = "Unemployment Compensation Lawyers"; $specialty4 = "Work Injury Lawyers"; } else if ($specialtyID == '811161' ){ $specialtyDir = "construction-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Construction Lawyers"; $specialty2 = "Construction Law Attorneys"; $specialty3 = "Construction Contract Lawyers"; $specialty4 = "Real Estate, Land Use & Construction Attorneys"; } else if ($specialtyID == '811162' ){ $specialtyDir = "corporate-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Corporate Lawyers"; $specialty2 = "Corporate Law Attorneys"; $specialty3 = "Commercial Transactions Lawyers"; $specialty4 = "Business Lawyers"; } else if ($specialtyID == '811163' ){ $specialtyDir = "credit-repair-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Credit Repair Lawyers"; $specialty2 = "Credit Attorneys"; $specialty3 = "Debt And Credit Lawyers"; $specialty4 = "Debt And Credit Law Firms & Consumer Credit Lawyers"; } else if ($specialtyID == '811164' ){ $specialtyDir = "defense"; $tablelist = "newlistlawyersothers"; $specialty1 = "Defense Lawyers"; $specialty2 = "Civil & Criminal Defense Attorneys"; $specialty3 = "Criminal Defense Lawyers"; $specialty4 = "Misdemeanor and Felony Defense Lawyers"; } else if ($specialtyID == '811165' ){ $specialtyDir = "disability-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Disability Lawyers"; $specialty2 = "Disability Attorney Law Firms"; $specialty3 = "Social Security Disability Attorneys"; $specialty4 = "Social Security Attorneys"; } else if ($specialtyID == '811166' ){ $specialtyDir = "employment-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Employment Lawyers"; $specialty2 = "Labor Attorneys"; $specialty3 = "Attorneys for Unemployment & Discrimination"; $specialty4 = "Wrongful Termination Attorneys"; } else if ($specialtyID == '811167' ){ $specialtyDir = "environmental-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Environmental Lawyers"; $specialty2 = "Environmental Law Attorneys"; $specialty3 = "Agricultural Environmental Lawyers"; $specialty4 = "Natural Resources Law Attorneys"; } else if ($specialtyID == '811168' ){ $specialtyDir = "intellectual-property-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Intellectual Property Attorneys"; $specialty2 = "Intellectual Property Lawyers"; $specialty3 = "Intellectual Property Law Firms"; $specialty4 = "Patent, Copyright, Trademark Attorneys"; } else if ($specialtyID == '811169' ){ $specialtyDir = "international-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "International Law Lawyers"; $specialty2 = "International Law Attorneys"; $specialty3 = "International Law Firms"; $specialty4 = "Foreign and International Lawyers"; } else if ($specialtyID == '811170' ){ $specialtyDir = "litigation-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Litigation Law Lawyers"; $specialty2 = "Litigation Attorneys"; $specialty3 = "Litigation Law Firms"; $specialty4 = "Litigation and Trial Attorneys"; } else if ($specialtyID == '811171' ){ $specialtyDir = "patent-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Patent Law Lawyers"; $specialty2 = "Patent Attorneys"; $specialty3 = "Trademark Attorneys"; $specialty4 = "Patent Law Services"; } else if ($specialtyID == '811172' ){ $specialtyDir = "tax-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Tax Lawyers"; $specialty2 = "IRS Tax Debt Attorneys"; $specialty3 = "Tax Law Attorneys"; $specialty4 = "IRS Tax Attorneys"; } else if ($specialtyID == '811173' ){ $specialtyDir = "trial-law"; $tablelist = "newlistlawyersothers"; $specialty1 = "Trial Lawyers"; $specialty2 = "Trial Attorneys"; $specialty3 = "Litigation and Trial Attorneys"; $specialty4 = "Attorney at Law"; } $sql = "select count(*) as total from $tablelist where `SIC CODE` = '$specialtyID' "; $oRs = $mysqli->query($sql); //while ($string = mysqli_fetch_array($sql)) $string=$oRs->fetch_array(); //$sql = $mysqli->query("select count(*) as total from wp_posts_saved where ID > ".$startpost." limit $limit ", $link); //$string = mysqli_fetch_array($sql); //$tot_rows = mysql_num_rows($sql); $tot_rows = $string['total']; $total = ceil($tot_rows/$per_page); echo "Pages: ".$total."
"; for ($i = 1; $i <= $total; $i++) { $txtrobots .= "Sitemap: https://". $_SERVER["SERVER_NAME"]. "/sitemap.php?specialtyID=$specialtyID&page=".$i."\r\n"; } } echo $txtrobots; $fp = fopen("robots.txt", 'w'); fwrite($fp, $txtrobots); fclose($fp); echo "Done!"; } ?>