Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. only the blacklisted file types will not be allowed to get uplaoded.. these extensions are not allowed.. if u want u can change that in here $ft["settings"]["FILETYPEBLACKLIST"] = "php phtml php3 php4 php5"; // File types that are not allowed for upload. and also for a specific file u can change this also $ft["settings"]["FILEBLACKLIST"] = "ft2.php filethingie.js ft.css ft_config.php index.php"; // Specific files that will not be shown.
  2. as of such i didnt gave any restrictions to file types, can u tell me which file types u are not able to see and have u kep any files in the upload folder.
  3. try with this code, copy the user name and password from here, as well u need to create one folder called as upload, to run this script i have attached here [attachment deleted by admin]
  4. ask ur server administrator to set the default page to be index.html for all ur sites
  5. open the php file and change these values define("USERNAME", "root"); // Your default username. define("PASSWORD", "root@123") // Your default password. mostly at the 27 and 28 line
  6. check this out http://phpfm.sourceforge.net/ if u want an ftp solution then check for ft2 or filethingie(http://www.solitude.dk/filethingie/) or else use this one http://www.blueshoes.org/en/applications/filemanager/
  7. if ur using the xampp then do this under the apache folder there will be conf folder which has httpd.conf, open it with any text editor and check for the line 249 < and see for this <IfModule change it like which i have shown above this should resolve the issue
  8. i could not able to get you. can u explain the term file manager.
  9. Hai i need to fetch the following data from the xml which i have attached as text file channel->title channel->item->text i have written the code in the following way but it is not working can any one help me out <?php $url='http://chaitu09986025424.blog.co.in/feed/rss/'; $xml = file_get_contents($url); $fh = fopen("test.xml", 'w'); fwrite($fh, $xml); $objDOM = new DOMDocument(); $objDOM->load("test.xml"); //make sure path is correct $channel = $objDOM->getElementsByTagName("channel"); // for each note tag, parse the document and get values for // tasks and details tag. foreach( $channel as $value ) { $titles = $value->getElementsByTagName("title"); $title = $titles->item(0)->nodeValue; $details = $value->getElementsByTagName("description"); $detail = $details->item(0)->nodeValue; echo "$task <br> $detail <br>"; $item=$objDOM->getElementsByTagName("item"); foreach($item as $value1) { $titles_item=$value1->getElementsByTagName("title"); $tit_item=$titles_item->item(0)->nodevalue; echo "hee<br>".$tit_item; } } ?> [attachment deleted by admin]
  10. u need to enable the telnet command in the 7 u can do this using this step by step instructions http://chaitu09986025424.blog.co.in/2009/12/08/enable-telnet-command-in-windows-7vista/ or else u can use this site to see what all ports are open in ur machine/ip http://canyouseeme.org/
  11. can u paste ur code here so that we can check it out.. i mean is that the entire code which u are using or something else..
  12. u should include a file right at the top of the php file u can use it under the <?php tag like this <?php include "inc.php"; print '<h1 class="backstage">Match Type Management</h1><br />'; print '<h2 class="backstage">Add New Match Type</h2><br />'; print '<form name="matchtype" method="post">'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width="120" class="rowheading" valign="center">Match Type:</td><td class="row3"><input type="text" name="matchtype" class="fieldtext490"></td>'; print '</tr>'; print '</table><br />'; print '<input type="hidden" name="newadded"><input type="submit" value="Save Match Type" class="button" name="addmatchtype"></form><br />'; print '<form method="POST"><input type="submit" value="Return to Match Type List" class="button200" name="return"></form><br />'; function matchtypes() { if(isset($_POST['addmatchtype'])) { $matchtype = $_POST['matchtype']; $query = "INSERT INTO `efed_list_matchtypes` (`matchtype`) VALUES ('$matchtype')"; if (@mysql_query ($query)) { print '<p>The match type has been added.</p>'; } else { print '<p>Could not add the entry because: <b>" . mysql_error() . "</b>. The query was $query.</p>'; } } } ?> i dont know y it didnt showed u any error.. it should have obviusly given u one.. just try this code and see.. also one more thing change the file name from inc.php to something relevant
  13. where are u using the connection string to the database and how can it add to database if not connected to any one of the dataservers...
  14. first thing to check is whether u can send mails from your localhost/server. check this out telnet <server ip address> 25 if it gives some time out or something then it is not working.. or else it is working then try using a simple mail program and see if it goes then it is happening try to echo the values of the details which u are fetching, i.e $email and all others.. first check on these.. and let me know
  15. dude i got tired of telling the same to everyone.. i used the preg function and the damn thing is not working for me.. so i am using the curl function. i wrote this to find out whether the given url is a valid Rss feed or not.. if u can give me a better solution that would be greatly appreciated.. i have used this function to check that !@$xml=simplexml_load_file("$subscr") after which i have tried the preg..and the funny thing is that preg will not work here as the urls for these feeds will not have common things for different sites
  16. hai i found a resolution for my problem.. hope this might help you out.. <?php $url_feed='http://google.com'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://validator.w3.org/feed/check.cgi?url=$url_feed"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); $output = curl_exec($ch); $fh = fopen("out.txt", 'w'); fwrite($fh, $output); $value1='Congratulations!'; $value='img alt="[Valid RSS]" title="Valid RSS" src="images/valid-rss.png" /> This is a valid RSS feed.'; $file=file_get_contents("out.txt"); //echo $file; $result=stristr($file,$value1); $fh1 = fopen("out1.txt", 'w'); fwrite($fh1,$result); $section = file_get_contents('./out1.txt', NULL, NULL, 39, 95); //echo $section; if($section==$value) { echo "Success"; } else { echo "The test case Failed"; } fclose($fh); fclose($fh1); curl_close($ch); ?> so here actually wht i am doing is that i am cutting the things that would be published above a particular keyword. and storing it in the out1.txt.. this would give the resultant things in which i need to check and i am scan only these for the validation..
  17. hi ur code is atmost perfect, There is nothing wrong in your code.. so can u check these things with your server. is this command giving any result like opening up SMTpP or vsftd something.. if yes then ur program should send the mail. or else try sending the mail using an smtp server and port u can use this code /* send mail using an smtp*/ <?php require_once "Mail.php"; $from = "Chaitu <drvirusindia@gmail.com>"; $to = "Chaitu <drvirusindia@gmail.com>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "mail.example.com"; $username = "smtp_username"; $password = "smtp_password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> it the smtp uses the autentication then try this code /*Sending Mail from PHP Using SMTP Authentication and SSL Encryption - Example */ <?php require_once "Mail.php"; $from = "Chaitu <drvirusindia@gmail.com>"; $to = "Chaitu <drvirusindia@gmail.com>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "ssl://mail.example.com"; $port = "465"; $username = "smtp_username"; $password = "smtp_password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> hope these would help u out..
  18. 10q for ur replies guys but the thing is it is not working as expected.. here is the code <?php $url_feed='http://tech2.in.com/rssfeed/rss_topstuff.xml'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://validator.w3.org/feed/check.cgi?url=$url_feed"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); $output = curl_exec($ch); $fh = fopen("out.txt", 'w'); fwrite($fh, $output); $value='img alt="[Valid RSS]" title="Valid RSS" src="images/valid-rss.png" /> This is a valid RSS feed.'; $file=file_get_contents("out.txt"); if (strpos($value,$file) === false) { echo ("The string is not in file"); } fclose($fh); curl_close($ch); ?> in the out.txt file i need to search for the $value..
  19. Hai i have a text file, which contains some information which gets created when i run a script. so the thing is how do i scan the entire txt file for a specific set of words whether they exist or not, is there any specific function in php
  20. hai priya dont u need to change your local domain sendmail_from = you@yourdomain to send a mail.and also can u check whether u have the port 21 opened in ur machine...one more thing as per ur error wht u are having might be it cannot able to connect to ur domain server which u have given. check whether u have mail server configured properly
  21. i am working on that will post the code here once i resolve it out
  22. i have used that one too but there was an issue with some of the rss feed urls, they are not getting recognised if (!@$xml=simplexml_load_file("$subscr")) the above code i have used out.. $subscr is the url of the rss feed i am using out. as this case failed i am trying to fetch the data by passing it to an other site.
  23. then i hope u cannot use the below code
  24. one more thing $section = file_get_contents('./out.txt', NULL, NULL, 1256, 95); change the numbers to the required ones
×
×
  • 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.