Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. for iTunes try the protocal itpc ie Header("Location: itpc://"); i don't think this will help but the itpc protocal is used for xml playlist including download but it for use with itunes only (as far as i know) of course the url should point to the xml with the itpc prefix but without the xml it will still open iTunes
  2. Heres a VERY basic example of what i think you want.. <?php if(!isset($_POST['submit'])) die("FAILED: nothing selected"); $dbcnx = @mysql_connect('localhost', 'root', ''); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('recipetime')) { exit('<p>Unable to locate the experience ' . 'database at this time.</p>'); } $typeoffood = $_POST['typeoffood']; $country = $_POST['country']; $sql = "SELECT * FROM recipeform WHERE country='$country' AND typeoffood='typeoffood'"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { echo "name".$row["name"]."<br>"; echo "country".$row["country"]."<br>"; echo "typeoffood".$row["typeoffood"]."<br>"; echo "yourrecipe".$row["yourrecipe"]."<br>"; } ?>
  3. Can someone else please test my code.. to confirm it works or fails.. (out of intrest)
  4. Read up on connecting sockets to web proxies.. then find some free web proxies (test it works, in IE for example) then send the data via that proxy
  5. Okay, one of the reasons as to why IP Spoofing is considered so much tough to perform is the fact that it is blind attack. What this means is that, you do not get any data back, When you perform any transaction via a Spoofed IP, there is no mechanism which tells you, whether he has been successful or not. So to sum up you could just say submit a entry to a form via a spoofed IP but if you had to enter an image verifcation code you would fail as you can't see that info.. AKA blind hope that helps EDIT: i Also agree with PFMaBiSmAd
  6. You could but the returned data wouldn't go to you.. it would go to the other IP.. you could use a Proxy Server
  7. Hummm, Heres my script, which works fine in IE7 & FF <?php // The file $filename = "company/uploads/girl2.jpg"; // Set a maximum height and width $width = 200; $height = 200; // Content type header('Content-type: image/jpeg'); $file = basename($filename); header("Content-Disposition: filename=\"$file\";" ); $filename = 'company/uploads/girl2.jpg'; // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); $ratio_orig = $width_orig/$height_orig; if ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } else { $height = $width/$ratio_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); ?>
  8. scrap that.. use this $result = preg_replace_callback('%\b((?:www\.|http://www\.|http://).*)\b%si', 'UpdateDB', $HTML);
  9. test site seams fine! Ahhh i found a slight bug ~Slight update~ $result = preg_replace_callback('%\b((?:www\.|http://www\.|http://).*?)\s?%si', 'UpdateDB', $HTM
  10. EDIT: lol close to mine for the path use $thumbnailPathUL = dirname(__FILE__)."/../../".$thumbnailPath; $mp3PathUL = dirname(__FILE__)."/../../".$mp3Path; //ALSO $move1 = move_uploaded_file($_FILES['thumbnail']['tmp_name'], $thumbnailPathUL.."/$thumbnail"); $move2 = move_uploaded_file($_FILES['mp3']['tmp_name'], $mp3PathUL."/$mp3");
  11. Nothing wrong with the code from what i can see.. do you have an online example or a damaged zip i can see ? whats the zip file size ? as a guess i would say the file is getting truncated or has some php output ie memory problems.. remember the <?php MUST be at the very start of the file..
  12. for the path use $thumbnailPathUL = dirname(__FILE__)."/../".$thumbnailPath; $mp3PathUL = dirname(__FILE__)."/../".$mp3Path; start and end with /'s
  13. can you post the code you have .. also add some debugging $query = "INSERT INTO mytable (ID, URL) values ('$id','$url')"; mysql_query($query) or die(mysql_error()."<br>$query");
  14. try this update $thumbnailPathUL = dirname(__FILE__)."../../".$thumbnailPath; $mp3PathUL = dirname(__FILE__)."../../".$mp3Path;
  15. No but considering the mime is supplied and JPEG and IE7 converts the file to BMP..thus ignoring the mime.. every other browser will use the file name from the url as the filename.. and the mime type for the file type it seams to be out of the standards.. yeah i dislike IE
  16. Okay.. whats not working. ?
  17. Yeah that due to crappy IE i just played with it and come up with a fix // Content type header('Content-type: image/jpeg'); header("Content-Disposition: filename=\"" . $filename . "\";" ); //Add this line (NAME not path) EDIT: more detail Okay, heres the problem ie see the file without a jpeg extension, thus we add the name of the file to the header and IE7 now know what format it is
  18. Yeah my bad you need to use $Add[1] instead of $Add <?php $HTML = "this is a test www.apple.com blar tesing http://apple.com blob http://www.apple.com hee "; $result = preg_replace_callback('%\b((?:www\.|http://www\.|http://).*?)\s%si', 'UpdateDB', $HTML); echo "<br>Final Output<br>"; echo $result; function UpdateDB($Add) { $id = md5($Add[1]); $url = $Add[1]; //Add the connection stuff for the database #mysql_query("INSERT INTO mytable (ID, URL) values ('$id','$url')"); //debug echo "INSERT INTO mytable (ID, URL) values ('$id','$url')"."<br>\n"; return "<a href=\"linkcheck.php?ID=$id\">LINK</a>"; } ?> *tested
  19. to get the QUERY_STRING use $_SERVER['QUERY_STRING'] or each key/value use foreach($_GET as $K => $V) { echo "Key:$K = $V<br>"; } to append to the existing URL try $Q= (!empty($_SERVER['QUERY_STRING'])?"?":$_SERVER['QUERY_STRING']."&"; //add SORT=ASC echo $Q."SORT=ASC";
  20. Er... no you lost me.. what are you trying to do ?
  21. This line of code GETs the URL $URLQuery = (!empty($_SERVER['QUERY_STRING']))?$_SERVER['QUERY_STRING']:"?"; to get the values from www.mysite.com/index?var1=abc&var2=def you use $_GET ie <?php echo "var1=".$_GET['var1']; //or if($_GET['var2']=='def') { echo "var2 = def"; }else{ echo "var2 is not = def"; } ?> or have a missed the question again ?
  22. why not replace the link with a link to your sites link checker with the DB entry ID ie mylinkchecker.php?ID=10002 in the DB have 10002 as the ID of the record for website phpfreaks.com etc to find the URLs use a REGEX replce like this:~ <?php $HTML = "this is a test www.apple.com blar tesing http://apple.com blob http://www.apple.com hee "; $result = preg_replace_callback('%\b((?:www\.|http://www\.|http://).*?)\s%si', 'UpdateDB', $HTML); function UpdateDB($Add) { mysql_query("INSERT INTO mytable (URL) values ('$Add'')"); return "<a href=\"linkcheck.php?ID=".mysql_insert_id()."\">LINK</a>"; } ?> **UNTESTED**
  23. quick code <?php $URLQuery = (!empty($_SERVER['QUERY_STRING']))?$_SERVER['QUERY_STRING']:"?"; echo "<a href=\"$URLQuery\">THIS LINK</a>"; //if not empty and is set to DESC then use DESC else use ASC $SORT = (!empty($_GET['sort']) && $_GET['sort'] == "DESC")?"DESC":"ASC"; $SQL = "SELECT * FROM TABLE ORDER BY $SORT"; ?>
  24. lol, yeah that will work as well
×
×
  • 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.