Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Yes it work the same way each time.
  2. Yes is possible. your need GDlib installed, (most have servers that installed) if you search for image resize your find tons on here
  3. See here http://www.phpfreaks.com/tutorial/php-security AND http://phpsec.org/projects/guide/4.html
  4. Use toaddress from the imap_headerinfo that will give you all the email address send to.. to put them into an array you could do this *untested* <?php $info = imap_headerinfo($m_mail, $msgid) preg_match_all('/\s?[^,]*/', $info->toaddress , $toaddress); $toaddress= $toaddress[1]; echo "<pre>";print_r($toaddress); ?>
  5. With the phone number you should filter it before its inserted and then format the output ie $Phone= preg_replace('/[^0-9]/i', '', $Phone); 555-1234 becomes 5551234 you can then do the same with the search to search for "any" you need to use LIKE and % as wildcards ie SELECT * FROM table WHERE company LIKE "%freaks%"; //contains freaks SELECT * FROM table WHERE company LIKE "freaks%"; //Starts with freaks SELECT * FROM table WHERE company LIKE "%freaks"; //Ends with freaks Hope that helps
  6. One problem with nu-coder is it requires "Php Express loader" to be installed on the Server while Zend requires "zend optimizer" which is included on most servers.. [*]First and foremost, the protection provided by encoders is questionable because the source code is while encrypted is still available. Decryption of such files is not terribly hard. If there is a malicious user who wants to get your source - there is a pretty good chance that he/she will break this protection [*]Second problem is the performance of the files encrypted with the php encoders from this category. Execution times tend to be slower because of the additional overhead produced by decrypting of the file prior to the processing.
  7. This seams pointless putting a vot up! if its paid for then post in the freelance section so are you submitting data to 4 sites ?
  8. Wouldn't be hard to write, but the browser window will be open during the hold process, (which will be awhile)
  9. If you want to run it outside the browser your need to use ssh or a crownjob
  10. Hotmail use "HTTP" access if you want POP you need to pay for the PLUS account.. So you could do the same for POP but only if you have a Plus account EDIT: I may invest some time into creating a script that allows you to get message from hotmail without needing the plus account.
  11. Are you trying to use FTP from you PC that connects to both server and transfers the data ? if so thats going to take ages! you best bet is to create a php script thats download the files to the host machine.. then put that script on the new server and let it run.. does the script below give you a list of files on the old server ?when its ran from the new server ? update this line first $dir = "ftp://usernae:password@remotehost.com/myfiles/"; <?php $dir = "ftp://usernae:password@remotehost.com/myfiles/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "<br>\n"; } closedir($dh); } } ?>
  12. Okay when you open gmail.. the page loads up and you see your messages (plus links) these are build by the dynamic page.. So http://mail.google.com/mail/?shva=1#inbox contains the links ie http://mail.google.com/mail/?shva=1#inbox/11f08c542531d23d, So if you read the html contents it must contain "?shva=1#inbox/11f08c542531d23d" thus you know the "inbox/11f08c542531d23d" code however i truly recommand you take the imap route.. untested <?php $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "username@gmail.com", "password") or die("can't connect: " . imap_last_error()); echo "<h1>Mailboxes</h1>\n"; $folders = imap_listmailbox($mbox, "{imap.gmail.com:993/imap/ssl}INBOX", "*"); if ($folders == false) { echo "Call failed<br />\n"; } else { foreach ($folders as $val) { echo $val . "<br />\n"; } } echo "<h1>Headers in INBOX</h1>\n"; $headers = imap_headers($mbox); if ($headers == false) { echo "Call failed<br />\n"; } else { foreach ($headers as $val) { echo $val . "<br />\n"; } } imap_close($mbox); ?>
  13. Connecting to your own site to check for a valid number.. well if i open the php file i can just remove that routine.., encrypting that php file well thats a slow down.. won't stop me but will slow me down.. The thing you should remember when it comes to securing your Apps.. is you can NOT stop someone stealling it.. if you send them the program they can hack it.. What you need to work on is a protection that will last as long as it take to release a new version or will waste so much of their time its cheaper to buy it.. if you don't mind me asking.. whats the app ? Attached is an example of Zend Encrypted Code: [attachment deleted by admin]
  14. When you curl the first page it's likes will have the "11f08c542531d23d" code.. BUT why not just use imap to connect to the gmail server ? and use it correctly
  15. No offence but if you hace Asperger syndrome then you need to start and study the basics even more, your need to pay look at the minor details more than the whole plan.. and you would NOT be the type of person who can just jump in at the deep end trust me i know more about Asperger's than you may think and if you are the type or person who need to jump in at the deep end then you don;t have Asperger and if you do then you have never started anything!
  16. This should do it <?php $dir = "cgi-bin/bin"; //FULL PATH $Guest = 0; $Members = 0; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if($file == "." || $file == ".." || is_dir($dir.$file)) continue; $size = filesize($dir.$file); if($size > 0) { $Guest++; }else{ $Members++; } } closedir($dh); } } echo "Members: $Members<br>Guests: $Guest<br>";
  17. <?php $filename = "Myfile.txt"; $file_ext = strrchr($filename, '.'); //gets .txt $newfile = "Whatever".$file_ext; //=Whatever.txt ?>
  18. your need to use addslashes() or better still mysql_real_escape_string() if you post you code with the "INSERT INTO" i could give you a actual example
  19. I agree with CV and heres an example <?php format_input( "test", T_STRIP); //pass 1 format_input( "test", array(T_STRIP, T_HTML)); //pass more than 1 format_input( "test", array(T_HTML)); //pass 1 (as an array will also work) function format_input( $variable_data, $variable_type ) { if(!is_array($variable_type)) { $variable_typeA = array(); $variable_typeA[] = $variable_type; }else{ $variable_typeA = $variable_type; } foreach($variable_typeA as $variable_type) { switch( $variable_type ) { //HTML clean #$this->page->postit_code# case T_HTML: $variable_data = nl2br( $this->strip_html( $variable_data, $this->config['system_allowed_html_tags'], false, true ) ); break; //HTML remove case T_NOHTML: $variable_data = $this->strip_html( $variable_data, $this->config['system_allowed_html_tags'], false, true, true ); break; //HTML remove case T_PREVIEW: $variable_data = $this->strip_html( $variable_data, $this->config['system_allowed_html_tags'], false, false ); break; //HTML <form> element clean case T_FORM: $original = array( '\\n', '\\r' ); $replaced = array( chr( 10 ), chr( 13 ) ); $variable_data = str_replace( $original, $replaced, $variable_data ); break; //Clean for database entry case T_DB: $variable_data = $this->xss_clean( $variable_data, false ); break; //Clean for database entry case T_STRIP: $variable_data = stripslashes( $variable_data ); break; //URL friendly case T_URL_ENC: $variable_data = urlencode( $variable_data ); break; //URL un-friendly case T_URL_DEC: $variable_data = urldecode( $variable_data ); break; //URL parsable for filesizes case T_DL_PARSE: $variable_data = str_replace( " ", "%20", $variable_data ); break; //Format based on locale case T_NUM: $variable_data = number_format( $variable_data ); break; //Nothin' default: break; } } return $variable_data; } ?>
  20. echo the query and then grab the SQL and try the where in a select ie SELECT * FROM users WHERE `username` = 'my-username' AND `active_hash` = 'hash-goes-here'
  21. try renaming it to shoutbox.php and put it in the public_html folder then open it.. or rename the .htaccess file to 1.htaccess
  22. Try this if (preg_match('/^[a-z0-9]*$/i', $_POST['field_1'])) { # It's alphanumeric }
  23. Okay it sounds like a rewrite problem.. have to created an .htaccess files ? added anything to "tidy the url" etc ?
  24. Add <?php die("TESTING"); ?> at the very top, to check it is infact a page problem and not a rewrite problem
×
×
  • 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.