-
Posts
1,686 -
Joined
-
Last visited
Never
Everything posted by Lamez
-
That is a good idea, but take a look at: http://us.php.net/manual/en/function.stream-get-contents.php I am not too sure what other functions you need, but that is a good start.
-
Thank You! You are very helpful! Final code: <?php $q = mysql_query("SELECT * FROM `users` WHERE `username` = '".$user_."'"); $qimg = mysql_fetch_array($q); $qimg = $qimg['avatar']; echo $qimg; echo "<br>"; $out = substr(strrchr($qimg, "/"), 1); echo $out; ?>
-
oh I get it! Let me see!
-
so are you asking on how to use a mysql_update query? <?php mysql_query("UPDATE `table` SET `name` = 'Lamez' WHERE `id` = '1'"); ?>
-
[SOLVED] Seriously!? How do you make secure pages, secure?
Lamez replied to DamienRoche's topic in PHP Coding Help
you could use exit, it will stop loading the rest of the page, so you will want it at the top <?php if (wrong info){ echo "Wrong Information"; exit; }else{ echo "Welcome!"; } ?> -
Oh thank you. I understand that now. Now back to the main topic, I did use strchar, and I get a output like: /fc60f5d7abc2e080599bb6dc465db54d-JamesLittle.jpg Then I read the manual on substr, like you said, and it was talking about removing parts of the string, but from the example, it looks like you have to know how long the string is, but I don't know how long it is, it can change depending on the username and other randoms. <?php $q = mysql_query("SELECT * FROM `users` WHERE `username` = '".$user_."'"); $qimg = mysql_fetch_array($q); $qimg = $qimg['avatar']; echo $qimg; echo "<br>"; $out = strrchr($qimg, "/"); echo $out; ?>
-
well see that is what I am asking, I did read the manual, but is unlink the best one?
-
ok, I am going to make a sandwich, and then I will get started on it. Thanks for pointing me in the right direction, also I will want to delete the image later on, do I use unlink() or imagedestory()?
-
wait, so I will need to use substr() first, then strchr()?
-
ok so I am working on my avatar system, and it encrypts the name, then it add the username with a hyphen at the end. Well that is not the problem I stored it in the database with a path, like this: user/userava/fc60f5d7abc2e080599bb6dc465db54d-JamesLittle.jpg, I was wondering how do I take out the user/userava/ so I just have fc60f5d7abc2e080599bb6dc465db54d-JamesLittle.jpg? -Thanks Guys!
-
lol its fine. I just wanna make sure I do not get hacked, and I think it is great there is a forum where I can find my exploits without the worry of being taken over.
-
http://www.monse.nl/Daan/ I know this is semi revalent, and you probably want it like this, but I would add a php file that redirects to the main site in this directory, and sub directorys so users cannot view its contents <?php header("Location: http://www.monse.nl/"); ?> save that in a php file called index.php and add it to all directorys except your main.
-
Registration Page. it takes you to a password gate, where you have to enter a password, correct?
-
lol ya, links is my link checker for my main site krazypicks, I just am testing my script, because my website will handle money transactions. You can take a look at it, but there is not much there. http://www.krazypicks.com you can see a name at the footer saying it is copyrighted by James Little, if you look in my profile on here I think my name is in it. I also own www.lamezz.com and www.lamezz.info All the footers match! lol I am not trying to get you guys to hack other peoples websites Oh also, you can also do a WhoIs on the domain!
-
Picture Uploader http://links.krazypicks.com/up.php
-
you could use include <?php echo "This is script one here"; include ("script_2.php"); echo "That was script two there"; ?>
-
lol, no Thanks
-
I found this on my Web host's site, it helps send SMS messages, but you are going to have to do a little programming, and mess with it. <?php ################################################## # SAMPLE PHP CODE TO SEND SMS VIA SERVAGE API ################################################## // Send SMS function function sendSMS($number,$message,$concat = 1) { $url = 'http://smsgateway.servage.net/sms.php'; $customer = 'YOURCUSTOMERID'; $key = 'YOURKEY'; $request = $url.'?customer='.$customer.'&key='.$key.'&number='.urlencode($number).'&message='.urlencode($message).'&concat='.$concat; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); return split(',',$response); } // Integration in your project $sms_api_result = sendSMS('number','text','1'); // Check if SMS was received by the API or not if ($sms_api_result[0] == 'OK') { // Ok, SMS received by the API // Do something here... } else { // Failure, SMS was not received by the API // I this example we display the response to identify the error print_r($sms_api_result); } ################################################## # SAMPLE PHP CODE FOR SMS COVERAGE QUERY ################################################## // Coverage Query function function coverageQuery($number) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://smsgateway.servage.net/sms_coverage.php?number='.$number); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); if (substr($data,0,2) == 'OK') return true; else return false; } ?>
-
I am using a image upload script, and I am getting this error: Warning: copy(imgWinter.jpg) [function.copy]: failed to open stream: Permission denied in /mounted-storage/home48c/sub007/sc33591-LWQU/link_check/up.php on line 18 ERROR: Unable to upload image. Could this be because safe mode is on?
-
I made a little script using a form, like I wanted: http://links.krazypicks.com/test.html
-
Ken you set echo as a variable. We all make mistakes!
-
Thank you guys, I understand it very clear now!
-
I read it, but it all says the same thing. I am trying to learn ok I am getting tons of results I used this code: <?php $num = 0; for ( $counter = 1; $counter = 5; /*$counter += 0*/){ $num+=1; echo $num."<br>"; } ?> and I am getting thousands and thousands results, and it is not stopping. Here is a link: http://links.krazypicks.com/test.php
-
so I am understanding it now. would this get me 100 results? <?php for ( $counter = 1; $counter >= 0; $counter += 0){ echo "<BR>YA YA<BR>"; echo $counter; } ?>
-
ok so I have another question I use this: <?php for ( $counter = 99; $counter <= 100; $counter += 10){ echo "<BR>YA YA<BR>"; } ?> but I only got one result. Why?