Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. I understood the question, you said you do not want to give them access which means the shell will not execute under their name. Your server itself is running the shell. If you need them to do something within Whitelister.exe maybe you should pass arguments along with it If you need to merely display the output of the script, it needs to write the data somewhere into like a buffer
  2. If you happen to use MIRC and would like a chat bot to be performing these commands let me know. I manage a video casting site and my moderators can control things like start,stop and restart the stream, start,stop,pause the player, do new playlists, switch to different casting types and all sorts of cool stuff. The two codes below are basic ones to start/stop the cast and player, I have more complex ones with macros,voting,audio messages and so on. MIRC casting bot script. on *:text:!start:#:{ if ( $nick isop $chan ) { describe $chan Cast is starting... Press play or refresh video. write -c C:\cast\startcast.txt yes } if ( $nick !isop $chan ) { msg $chan Sorry $nick , only mods can Start Cast } } on *:text:!stop:#:{ if ( $nick isop $chan ) { describe $chan Cast is stopping. write -c C:\cast\stopcast.txt yes } if ( $nick !isop $chan ) { msg $chan Sorry $nick , only mods can Stop Cast } } This is a run bat script looking for any new files to perform actions. @echo off :loop timeout /T 5 IF EXIST "C:\cast\startcast.txt" ( DEL "C:\cast\startcast.txt" ECHO startcast.txt deleted ECHO Killing all Potplayer taskkill /F /IM PotPlayerMini.exe 2>NUL ECHO Killing all FME taskkill /F /IM FMLECmd.exe 2>NUL ECHO PotPlayer Starting start /d "C:\Program Files (x86)\Daum\PotPlayer\" PotPlayerMini.exe ECHO FME Starting taskkill /F /IM fme.bat 2>NUL start cmd /k Call fme.bat ) IF EXIST "C:\cast\stopcast.txt" ( DEL "C:\cast\stopcast.txt" taskkill /F /IM fme.bat 2>NUL ECHO stopcast.txt deleted ECHO player stopping taskkill /F /IM PotPlayerMini.exe 2>NUL ECHO FME stopping taskkill /F /IM FMLECmd.exe 2>NUL ) cls goto loop
  3. I guess you can just echo to them what the action was, and hope it actually executed. Otherwise you can look into popen() or proc_open() to check on the actual processes Another option is to write and then delete a new text file, then have php check with file_exists() taskkill /f /im arma2oaserver.exe cd c:\dayz @echo off echo Starting server... start .\Expansion\beta\arma2oaserver.exe -mod=Expansion\beta;Expansion\beta\expansion;ca;@hive;@dayz -name=cfgdayz -config=cfgdayz\server.cfg -cfg=cfgdayz\basic.cfg -profiles=cfgdayz PING 1.1.1.1 -n 1 -w 60000 >NUL cd c:\dayz\whitelist start Whitelister.exe IF EXIST "C:\www\stop.txt" ( DEL "C:\www\stop.txt" set /p texte=< "C:\www\start.txt" ECHO %texte% ) exit Or within the batch file itself change the data within a text file, and always show the text files data when you exec your bat script from php. I guess it depends how complex you want this to become
  4. If you are using mysql you can be inserting using AUTO_INCREMENT If and after it inserted you can get the id by using mysqli_insert_id()
  5. Ok, lets make sure you are going about this correct. I see you are using Twenty Thirteen template, browse to that theme folder and make a new file called custompage.php Paste this within and save it: <?php /* Template Name: CustomPage */ ?> <?php get_header(); ?> <style> <!-- div.newcontent { width: 80%; background:#000000; color:#DF0101; text-decoration: none; text-align:center; margin-top:0px; margin-bottom:0px; margin-right: auto; margin-left: auto; padding:0px; } --> </style> <?php echo "<div class='newcontent'>"; echo "Any code gets added this area"; echo "</div>"; ?> <?php get_footer(); ?> Go to your dashboard Create a new page and name it what you desire At the bottom right under "Page Attributes" select the "CustomPage" under "Template" Publish your page
  6. Internet Explorer can render older versions of itself Open IE, click F12 or in the menu do Tools -> F12 Developer Tools Up top will see Browser Modes, select a different one.
  7. Can make a child theme and make any changes there, not usually a good idea to edit the original one. http://codex.wordpress.org/Child_Themes You can also just use <style></style> tags for each custom page Or even something like this I'm using custompage as the page name <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" /> <?php if(is_page_template('custompage.php')) :?> <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/custompage.css" media="screen" /> <?php endif;?>
  8. Read what you wrote wrong
  9. There are many services that can show a website image with a given url Some are free but usually have limitations such as views,a watermark image,limited sizes or can only snap main domains. Sometimes their paid versions can do additional, not always though. Just a few of them, can do searches for more. http://www.shrinktheweb.com/ http://www.websnapr.com/ http://www.thumbshots.com/ http://webthumb.bluga.net/home Making a thumbnail snapshot server takes a lot of work. As far as I know is none that can render flash as a snapshot in linux. http://code.google.com/p/wkhtmltopdf/ (has wkhtmltoimage) http://pielmeier.blogspot.com/2011/02/headless-html-page-rendering-with.html http://cutycapt.sourceforge.net/ For windows can use php's imagegrabscreen() or imagegrabwindow() Is a few programs not server side but applications that can insert urls or can do urls from lists. http://www.websitescreenshots.com/ http://www.ducklink.com/p/command-line-screen-capture/ I'll explain how I do my snapshot server, maybe will help or not. I use a windows server. save images as 40% of original image at 1024x768 resolution for browser, approx 400px save all images as md5 and png I myself have used a combination of methods. using webshot, and running lists of urls through it multiple machines exec firefox and use a plugin https://addons.mozilla.org/en-US/firefox/addon/pagesaver/ php scripts and use imagegrabwindow and internet explorer For all the above I save to the same central folder. I made my thumbnail server more of an "on the fly design", I do not store their locations in a database. My php script will fetch GET parameters, and depending on those will output various types of thumnails using GD I check if the image exists using file_exists() and by creating url locations to check against. I parse the urls with parse_url() to get the domain and subdomains, also made my own function to get main domains from subdomains. You can use an if/else() statement or a switch() depending if you want to use the first image it finds, or continue looking for a best or preferred image, such as the parsed one I first look for exact image inserted, then a parsed one, then it continues with a lot of popular file types such as with or without http or https, www. with or without end slashes, locations such as index.php,index.html, index.asp and so on, I made an array for any file patterns i want to look against. If a match is found will display that image resized and output to the browser using gd, I do not save them in cache, but you can if wanted to. If no image is found I then execute to snap the image. You can determine what image to snap, like either the parsed domain, or the full url inserted. I have been using my system around 4 years now with no issues, over 10 million estimated images stored and haven't seen an issue. Just don't try and browse a folder storing that many images. And you can try my thumbnail server out if you want. http://dynaindex.com/snapshot.php And here is just one example of my snapshot images http://dyna.dyndns.tv/url-thumb.php?size=400&text=HOST&textsize=10&textcolor=aqua&url=http://www.phpfreaks.com/
  10. Nothing should be doing it there. Can look in top.inc.php,header.php,footer.php or within your imageslider script?
  11. The reason your image is being distorted is that you define the height of your footer css to 20% height:20%; Eliminate that value and let the footer be as large as needs to be. Now using what cyberrobot said. footer img { width:100%; }
  12. If you want to learn php, you can go to the source, everything will be accurate and usually is example codes as well. http://www.php.net/manual/en/getting-started.php You can install wordpress and install a commerce plugin http://wordpress.org/ wp e-commerce is the most popular one, there are others. http://wordpress.org/plugins/wp-e-commerce/ Is tons of plugins available, most are free, some are for sale or pro versions, you can also make your own plugins for wordpress if wanted to. To me wordpress would give you a big headstart.
  13. Use the full <?php code tags and not the short <? There are unquoted href attributes. echo "<a href='index.php'>HOME</a>"; As of php version 5.5.0 you should be using mysqli and not mysql http://www.php.net/manual/en/function.mysqli-connect.php
  14. If this just happens on products,maybe is something in that code doing it as well, you can try posting products.php code here in bb code tags.
  15. I got a similar url but different domain when trying products, but when tried to get to it again I couldn't and everything worked fine. My advice would be to look for any suspicious files located on your server, you may be able to narrow it down by date and when you first noticed the issue.
  16. Am not sure what your goal is. Do you want to add items to start using it or learn how to start modifying it in some way. http://codex.wordpress.org/ Add some useful plugins? such as spam blocking, askimet,stop spammer, registration captcha Is mod rewrite enabled on server? Can enable fancy urls I guess it matters what you really need to do with it.
  17. Maybe is a browser issue, seemed to work fine and added a new entry
  18. Use backticks to escape that dash $sql = "SELECT * FROM `product-categories`";
  19. Include your mysql connection file at the top of your scripts include('dbconnect.inc'); Then when calling on your connection something like this $result = mysqli_query($dbc, "your query here");
  20. 1. If I want to get a job in the web developing business, what will help me most? I'm sure getting familiar with the popular cms out there will help, possibly making themes and plugins, or at least being able to edit them. But when it comes down to it, you should be focusing on html, css, javascript and your php skills to make complete sites as customers request. 2. If I will start my own company and have to sell much sites, in an easy way, what helps me most then? You say selling sites, do you mean hosted sites? Are you creating your own cms or customized ones? Regardless of your answer to this, the answer to question one can be applied in whatever you do. I have done multi wordpress sites,hosting them,custom themes and plugins, it all takes the time to familiarize yourself with wordpress as a user and also as a developer reading the wordpress codex
  21. The larger you set varchar the bigger the data will be, even if you insert a value that contains 12 characters, it will take up the space of 255 in the database. After mysql version 5.03 ...you can set this all the way up to 65,535, although I don't know anyone that would want or need to. http://dev.mysql.com/doc/refman/5.7/en/char.html You can try to set these for something that can match your data, or a hair larger to be sure, such as a name only needing around 30 or 40 characters. Numbers can be int, those also have different character amounts but work on display. http://dev.mysql.com/doc/refman/5.5/en/numeric-type-attributes.html If any of those are going to be optional and may contain a blank value, you can set them to NULL so your query can still insert.
  22. I like ubuntu server 12.04 lts or ubuntu server 13.04 lts and install kubuntu desktop gui Try some turnkey apps in a virtual machine. http://www.turnkeylinux.org/
  23. There is a post named secret in the form which is hidden. If the form is submitted by a normal person, since they do not see it in the actual form, there should never be anything passed through $_POST['secret'] Bots on the other hand try to fill in every value of a form usually, so $_POST['secret'] might have data. isset() is checking if something "is set", in this case $_POST['secret'] trim() with no additional parameters will trim just whitespace trim didn't make it die, because all my conditions were met, it executed my statement that had die() I myself determined to use the != and check for blank, which is either "" or '' The comparison operators are located here curly braces are a wrap for a block of statements Is hard to tell you everything about how to code php, is many tutorials on the net, books, or can refer to php.net
  24. You are using POST, server expects GET , if is not that is your credentials.
  25. You can try increasing the following values in your php.ini file until it works. The values below are examples. memory_limit = 32M upload_max_filesize = 2M post_max_size = 3M
×
×
  • 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.