Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: 748323
  • Content: Threads
  • Order by date
  1. 748323

    Can cURL work off of the brower's cookies?

    I know how to use cURL, but I've always had to manually plug cookies into the script. Can cURL work off of the browsers cookies? This would probably be very dangerous, so I doubt it can, but its worth knowing. Thanks.
  2. 748323

    Function to return prime factors

    Grr.. I've been trying to figure this out for a few days now, but I can't figure it out. I've been into PHP for about 6 months now, so I know the functions needed. I just can't convert it into code. Here is a function I made to return the first pair of factors that isn't 1 or the number. 20...
  3. 748323

    Creating an online proxy. Help with masking your IP?

    Well, I've created a very basic online proxy. I'm having trouble setting up the proxy. This is what I have so far: <? $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $_POST['url']); if ($_POST['cookies'] != "") { curl_setopt($curl, CURLOPT_COOKIE, $_POST['cookies']); } if...
  4. 748323

    Is there anyway to pass POST variables to a site with Header()?

    I'm getting pretty good at PHP, and I was just wondering, when I use Header("Location: "), I can pass GET variables through the URL. Is there anyway I can pass POST variables do the page? Thanks.
  5. 748323

    Redirecting with javascript to a variable site

    I'm new to javacript, but I am decent in PHP, so I have some background in programming. Say variable "k" has a value of "10". I want the browser to redirect to something like: http://www.my_site_e2.com/int.php?x=10 Pretty much, just redirect to a site, and use the GET method to communicate...
  6. 748323

    Making my own STRPOS function.

    Honestly, I hate PHP's STRPOS. I never seem to remember how to use it, unless I look it up on php.net. I decided to make my own function to check if one string is present in another. Other than slower loading times, is there anything bad about using my custom function? Thanks. <? function...
  7. 748323

    Basic encoding function gone wrong

    I'm making an encoding function, but it went wrong already. I know that this would be very easy to crack, but it will become a lot more complicated later on. Pretty much, the code declares the variables, changes them into arrays, and uses Str_replace to replace all instances in $_GET['x'] with...
  8. 748323

    Problem with a basic function

    This function is supposed to switch the string around a bit. ABCD --> BADC ABCDE --> BADCE (Even though it doesn't add the last character if the string's length is odd yet, I will add it later). <? function sss($string) { for ($i=0; $i <= strlen($string); $i += 2) { $chr1 = $string{$i}...
  9. 748323

    How do you actually make 'Security codes'?

    Ones that display an image, and then you have to type in what you see. I know how to use PHP, and I know how to create a random image. But, how do you tell the script that the security code is indeed 'ang2', for example? Thanks. Deja-vu (Random)
  10. 748323

    Problems with GD

    Every time I use GD, its impossible for me to use any other scripts. For example, I wrote this 'Scribble generator' when I was bored <? $image = imagecreate(500,500); $back = imagecolorallocate($image, 0,0,0); for ($x = 0; $x < rand(3,7); $x++ ) { $arrayx = array(); $points = rand(100, 300)...
  11. 748323

    Saving pictures from the web onto your server (GD problem)

    I made this script. It is supposed to copy the image, and save it on my server. For the most part, it does do what's its supposed to do. <? $image = imagecreatefromjpeg("http://www.rareteens.com/teen/met50/2.jpg"); imagejpeg($image, "pic.jpg"); ?> This would load the picture, and save it on...
  12. 748323

    Function that converts integers to numbers in words

    I know that I can use some weird library to do this, but that's not fun, and I don't actually learn anything. I wrote a small function that is supposed to work up to 99, but it only works with integers 0-19. What's wrong with the script that returns the words for 20-99? It doesn't return false...
  13. 748323

    Problem with GD library - Gif files

    I made another "Map" program, where people can add themselves to the map, and see where everybody lives. http://kidsspynet.com/scorpion990/map/view.php http://kidsspynet.com/scorpion990/map/add.php The image doesn't actually overwrite itself everytime. It creates text files containing the...
  14. 748323

    How did somebody exploit my programming?

    I created a basic members-only website. To ban a member, I had a script that will create a text file called "Banned user + .txt" and place that file in another directory. Somebody found out the directory, and could create any text file he wanted and place it in that directory, and therefore...
  15. 748323

    What program will format PHP scripts?

    For example. if (statement) { block; } to : if (statement) { block; } Thanks.
  16. 748323

    Reading a file from a different directory

    The script below is placed in: http://kidsspynet.com/scorpion990/login/hack_test.php <? $file = "/users/logs/log1.txt"; $handle = fopen($file, "r+"); echo fread($handle, filesize("$file")); ?> It gives me an error, even though: http://www.kidsspynet.com/scorpion990/login/users/logs/log1.txt...
  17. 748323

    Problem with making images using GD

    This is supposed to randomly choose 3 letters, and place them in an image. All it does right now is choose a random background color, which is not what I want. The background is supposed to be white, anyways. Any idea why this doesn't work? Thanks. <? $picture = imagecreate(200,200); $lets =...
  18. 748323

    Learning MySQL - Some questions

    I learn better if somebody directly answers my questions, instead of just reading. So.. here is what I think I know about MySQL. Please correct me if I'm wrong. A MySQL database is a file that contains many different variables, and their values. Each database has different tables. These...
  19. 748323

    Problem with custom functions

    I tried creating my own function that will reverse a string. I know I can use strrev(); but that's not fun, and it doesn't teach me anything :) <? function reverse_string($string, $var2) { $str_len = strlen($string); for($i = $str_len; $i >= 0; $i--) { $var2 .= $string{$i}; } }...
  20. 748323

    2 basic questions (str_replace with slashes, integers -&gt; strings)

    1. Is there a function in PHP that will convert integers to their string form? 1 to one, 2 to two, etc. 2. When I try to use str_replace() to replace a slash or a bracket with anything else, I get an error. What am I doing wrong? thanks!

Part and Inventory Search

Back
Top