Jump to content

dc2007

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

About dc2007

  • Birthday 07/14/1986

Contact Methods

  • MSN
    deathcat15@hotmail.com
  • Website URL
    http://www.nzbgrabit.com/

Profile Information

  • Gender
    Male
  • Location
    Manchester, UK

dc2007's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. try insert the content example $content = get_url("http://url-to-content"); preg_match("~<span style="color: red;">Your Price</span>:$(.+?)<br>~s", $content, $match); $price = preg_replace("$","",$match[1]); $price = ltrim(rtrim($price)); echo $price; function get_page($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $content = curl_exec($ch); return $content; }
  2. hi i have looked around that site i cant see any example with LIBXML_PARSEHUGE in it but also it states Only available in Libxml >= 2.7.0 (as of PHP >= 5.3.2 and PHP >= 5.2.12) im running PHP 5.3.13 and 5.4.4 can you please give me an example of how to implement it into the original code.. thanks
  3. i put simplexml_load_string($filecontent,'LIBXML_PARSEHUGE'); and get error Warning: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'LIBXML_PARSEHUGE'
  4. you very welcome that would be fine love.
  5. really need help with this Urgent if possible...thanks
  6. try this mate <script type="text/javascript"> function get() { $.post('search_tsr.php', { search_term: $("#Name").val() }, function(output) { $('#search_results').html(output).show(); }); } $("#SceneName").live("keypress", function(e) { $("#form").submit(); $.post('search_tsr.php', { search_term: $("#Name").val() }, function(output) { $('#search_results').html(output).show(); }); }); </script> <form name="form"> <img src="gfx/search_magnifyer.jpg" width="18" height="18" border="0" align="absmiddle"> <input name="name" id="Name" type="text" value="" /><input type="button" onClick="get()" value="Go"> </form> <div id="search_results"></div>
  7. yes mate as long as the $_POST['imgurl is the full path to the file if not then you must put unlink("/path/to/files/".$imgurl);
  8. Good lol nice to meet a girl whos interested in php coding lol whats your site will take a look and if you need anymore help im around. p.s i think you need to edit your first post to change status to solved.. David.
  9. if you are a female i will lol glad i could help.
  10. try this mate <script type="text/javascript"> function get() { $.post('search_tsr.php', { search_term: $("#Name").val() }, function(output) { $('#search_results').html(output).show(); }); } $("#SceneName").live("keypress", function(e) { if (event.keyCode == 13) { $("#form").submit(); $.post('search_tsr.php', { search_term: form.name.value }, function(output) { $('#search_results').html(output).show(); }); } }); </script> <form name="form"> <img src="gfx/search_magnifyer.jpg" width="18" height="18" border="0" align="absmiddle"> <input name="name" id="Name" type="text" value="" /><input type="button" onClick="get()" value="Go"> </form>
  11. looking at the script its not querying the database to find the file name add under unlink(); add echo $file; what does it return
  12. try replacing downloads with you whole path to the file unlink("/path/to/file/downloads/".$file);
  13. change unlink("./downloads/".$file); to unlink("../downloads/".$file);
  14. is the downloads folder in the same folder as the php file is so replace the code with: <?php $host = "localhost"; $user = "myusername"; $pass = "mypassword"; $database = "mydatabasename"; $conn = mysql_connect($host, $user, $pass) or die( mysql_error() ); mysql_select_db($database) or die( mysql_error() ); $table = mysql_real_escape_string( $_GET["table"] ); $id = mysql_real_escape_string( $_GET["id"] ); $message = mysql_real_escape_string( $_GET["message"] ); $redirect = mysql_real_escape_string( $_GET['redirect'] ); $file = mysql_real_escape_string( $_GET['file'] ); unlink("./downloads/".$file); $sql="DELETE FROM $table WHERE id='$id'"; $result = mysql_query( $sql ) or die( mysql_error() ); if($result) { header("Location: ../successful.php?message=$message&redirect=$redirect"); }else{ echo"there was a problem!"; } mysql_close($conn); ?>
×
×
  • 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.