Jump to content

tommytx

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by tommytx

  1. Thanks for your input Guru, but it appears that I am not making myself clear. If I undestand your code correctly, if I place it in a php file on my server and visit that page it will give me the headers for my own server.  I want to see the headers sent from the remote server when I query them for a page. I will try to explain in other words what I am trying to do. I want to have a form on my site the will allow someone (a visitor) to fill in their url and when submitted, the php code in this form/php file will visit the page they have entered and tell them the headers of the remote site they have enterer. Like 404 for can't find and 200 for ok and etc.... since this seems to not be clear  I have included an exact example of what I am trying to do with a sample at http://www.webmaster-toolkit.com/http-header-viewer.shtml
  2. [quoute] There is a lot of sites offering a free header check where you can enter any url even with an html page and it will tell you all the headers. [/quote] from above... LD, I explained above, that I want to have a php form on my site so that somene can visit and enter a url to one of their sites and it will load thier page and feed them back the results like a 200 if ok or a 404 for page not found... This is a popular script and you see it on tons of sites. Jr, I have studied that script before, and could not figure out how to do it, but I will re-visit it again and see if I can make heads or tails of it. Thanks to both of you for your reponses...  hopefully I have clarified it more.
  3. The code below will parse the web page in web.txt file and extract all full domain named URLS as long as the domain is included: Now I would also like to extract all the ones that do not have a domain name listed.... see sample below. ************************ begin code to extract domain URL's **************** $link = ""; $html = file_get_contents("web.txt"); $urls = '(http|file|ftp)'; $ltrs = '\w'; $gunk = '/#~:.?+=&%@!\-'; $punc = '.:?\-'; $any = "$ltrs$gunk$punc"; preg_match_all("{\b$urls:[$any]+?(?=[$punc]*[^$any]|$)}x",$html,$matches); //the below prints out all the urls that were extracted.   foreach ($matches[0] as $u)   {     $link =  '?url=' . urlencode($u);     echo "<A HREF='$link'>$u</A><BR>\n";   } // the below prints the total number of url's located. printf("Output of URLs %d URLs<P>\n", sizeof($matches[0])); ***************** End of code to extract domain urls. **************** Below urls 3 and 4 have the domain name and extract fine.. what can I add to extract the non domain urls as in 5 and 6. For best results, I would like to simple duplicate the above and run it again on the web.txt file after changing the regex to allow pulling out the short urls.. 1. <a href="httpcolon//www.idaho.com/vahud/hud_tom.htm>HUD Homes</a> 2. <a href="httpcolon//www.idaho.com/tomchambers">MLS Homes</a> 3. <a href="buy_sell_house_hampton.htm">buy_sell_house_hampton</a> 4. <a href="newport_news_homes_for_sale.htm">newport_news_homes_for_sale</a>
  4. There is a lot of sites offering a free header check where you can enter any url even with an html page and it will tell you all the headers. Especially useful when you are wondering if your site is throwing out a 404 when you have a page missing. Lots of sites throw out a 500 which is not good. The code to read headers should be a short little program in php. Can anyone steer me to where I might find this source code or maybe even dump it on me here, I would be forever grateful. I have seen a lot of how to send headers using php but what I need is how to read the headers when you visit a site..... Thanks Tom
  5. Thanks for the quick response... But when I did the phpinfo(); it indicated that what I thought was wrong was not.. as I laid the correctly working server php.ini file right next to the nonworking php.ini file using 2 browser windows runnning the command phpinfo(); and realized all the things I thought may be wrong were not... both php.ini files showed "send_mail path = /usr/sbin/sendmail -t -i" and "SMTP = localhost" of course without the -t and -i ... So now I have no more ideas... Here is the problem in a nutshell... maybe someone can offer a suggestion as something else I might check..... On hostgator,one other host, and a VPS on slhost (3 different hosts)... the php mailer (open source) works just fine for sending html emails... but on 2 other hosts... one of which is a VPS at Godaddy.. flat will not send mail using php mailer.....and gives no errors.... but errors may be turned off....not sure about that.... I can run the html form that feeds the php mailer on any of the servers but to make it work the php mailer must be located on one of the first three servers above.... I initially suspected that either the SMTP or the sendmail path was wrong... but now that I learned how to look at them via phpifo() I  can see that they are identical in the path to sendmail and SMTP is local host.....and now I am fresh out of ideas and no longer need to edit the php.ini file thanks to the info provided by "thorpe" above... thanks again. Can anyone think of anything else I can check to find out why the godaddy VPS will not send mail using php mailer.... the basic mail() command works fine but I need to send the email via "html email" and not plain email..... any suggestions would be grateful.... Thanks in advance....
  6. Can anyone tell me how to locate and edit the php.ini file on a linux server...using SSH or is there an easier way... I am using putty to log into the root but do not see the php.ini...
×
×
  • 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.