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.
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...
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...
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.
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...
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...
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...
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}...
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)
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)...
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...
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...
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...
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...
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...
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 =...
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...
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};
}
}...
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.