Follow us on Twitter!
Ideas are far more powerful than guns.
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 22
Guests Online: 20
Members Online: 2

Registered Members: 82886
Newest Member: The Slummy
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Comments and Suggestions

Page 1 of 2 1 2 >
Author

php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-01-09 20:55
i am setting up a server and i am using a book called "learning php and mysql". according to the book i can use the following string to check if my server works but for some reason my browser cannot find it so maybe there is something wrong with the string or the way I am typing it:

<?php phpinfo ( ) ; ?>


Author

RE: php help

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 05-01-09 21:04
Your browser cannot find it? What are you saving the file as? Do you have PHP installed on your computer? How are you viewing the files? Are you uploading to a free host service, or just double clicking an icon somewhere? Knowing what you're doing makes it easier to help.


i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-01-09 21:07
i installed php and the string is supposed to check if the php/apache installation was successful. I am trying to setup my own server. i am saving the file as .php


Author

RE: php help

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 05-01-09 21:20
It doesn't exactly check to make sure everything is set up fine. It "Outputs a large amount of information about the current state of PHP." Version, where it's loaded, HTTP header info... it's not a yes/no thing.

Anyway, how are you trying to open it? I'm not a PHP master by any means, but I have XAMPP installed and my PHP files will only work if I access them through http://localhost/. Double clicking their icons on the desktop doesn't help.

And what do you mean 'doesnt find it'. Are you getting a blank page, error, what?


i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-01-09 22:29
it says it cannot find the page

when i try to restart the server it says it cannot determine the server's fully qualified domain name. What does that mean?





Edited by on 05-01-09 22:31
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-01-09 23:19
<?phpinfo();?>
Author

RE: php help

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 05-01-09 23:27
slpctrl wrote:
<?phpinfo();?>


Cannot find file. The problem occurs before the code parsing.

@OP, are you sure about the filename? If you're coding in notepad you might have saved the file as filename.php.txt, because notepad auto-adds .txt if you don't change that setting while saving a file.

Also, make sure Apache is running (on the right port).



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-01-09 03:08
Put the php file containing the <? phpinfo(); ?> in C:\Apache2\htdocs\, then navigate to http://localhost/whatever-you-named-the-file.php. If it doesn't work, restart Apache (Start, Run, services.msc, Apache2, Restart), then try again. List any issues you have.


Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-01-09 11:37
give us screen shots


Author

RE: php help

AldarHawk
Member



Posts: 1690
Location: Canada
Joined: 26.01.06
Rank:
Hacker Level 1
Posted on 06-01-09 11:59
Screenshots work well and all but I think you need a more personal touch. Message me on MSN or PM me here or on any of my websites.

I will give you a hand with your issue. I think I know your problem.


Just ask Yahoo!Taboo! http://www.erikwestlake.com
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-01-09 12:17
If you like the easy way, you can install xampp.

If not, this will help you, I think.
http://blog.tarag. . .2-minutes/



Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:02
Don't wanna make a new topic so I'll put this here.

First of all, I'm still studying / learning PHP so I gotta say I don't know much about it. That's why I need some help.

I'm doing some basic websites for a couple of friends and one of them wanted a contact form. So first I did it with mailto -command, but 'cause it always popped up Outlook I started to look different ways to make the form. After googlin around I found this simple copy-paste php-form for contact. It has two php-pages that look like this:

Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email Form </title>
<body>
<form method="post" action="sendeail.php">

<!-- DO NOT change ANY of the php sections -->

<input type="hidden" name="ip" value="88.113.97.167" />
<input type="hidden" name="httpref" value="" />
<input type="hidden" name="httpagent" value="Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.9.0.8) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />

Attention:<br />
<select name="attn" size="1">
<option value=" Sales n Billing ">Sales n Billing </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Webmaster ">Webmaster </option>
</select>
<br /><br />
Mail Message:
<br />
<textarea name="notes" rows="4" cols="40"></textarea>

<br />
<input type="submit" value="Send Mail" />
<br />
Free Code at: <a href="http://www.ibdhost.com/contact/">ibdhost.com/contact/</a>
</form>

</body>
</html>




Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>


<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->

<?php

$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];


if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}

if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
die ("Use back! ! ");
}

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn ;
$subject = $attn;

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $visitormail\r\n";


mail("yourmail@mail.com", $subject, $message, $from);

?>

<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />

Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>

<br /><br />
<a href="contact.php"> Next Page </a>
</p>

</body>
</html>




The problem is that in the contact.php (that is the upper one of the two) has only three fields (name, mail & text-area) for a visitor to fill in, but I need four (name, mail and two text-areas). I tried adding another text-area and I can see it when I look it with the browser. When I fill-in all the boxes and make it send a mail to me, I don't recieve any information from the second text-area (the one that I added later on). I do get info from the original boxes (name, mail and text-area) but nothing from the one I added. What do I have to do / how do I change the code to make another text-area and make it include that info to the mail?




Edited by on 06-04-09 18:06
Author

RE: php help

GTADarkDude
Member



Posts: 142
Location: The Netherlands
Joined: 23.02.08
Rank:
Newbie
Posted on 06-04-09 18:23
Well, of course it doesn't show up in the e-mail if you don't include it in the $message variable. I'd advise you to learn PHP before you start downloading arbitrary scripts on the internet. Do you actually know what each line in the script does?

Edit: My apologies, a quick glance was not enough to see what you were doing. I did not look trough the script thoroughly enough and missed a couple things. Again, my apologies.


...

Edited by GTADarkDude on 06-04-09 20:03
- - -
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:25
Just make another text area as the previous one with a different name and then catch it in the second page using : "$_POST"

How to use $_POST is there in the second page code that you posted.
Then use that value in your mail.
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:27
GTADarkDude wrote:
Well, of course it doesn't show up in the e-mail if you don't include it in the $message variable. I'd advise you to learn PHP before you start downloading arbitrary scripts on the internet. Do you actually know what each line in the script does?


I would also like suggest you to go and read the PHP because the thing you are asking is there, just you should know what each line is doing and edit it to your use.
Author

RE: php help

ynori7
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
Posted on 06-04-09 18:37
<form method="post" action="sendeail.php">

I think there's a typo in your filename, but that wouldn't be the problem.

It is in fact getting the data from all the inputs. Make use of echo's to debug and find where your problem is.
Code
echo $ip."<BR>".$httpref."<BR>".$httpagent."<BR>".$visitor."<BR>".$visitormail."<BR>".$notes."<BR>".$attn;



Put that line right after you pull in all the $_POST data and you'll see that all the data is there.


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg


Edited by ynori7 on 06-04-09 18:38
ynori7 http://halls-of-valhalla.org
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:51
ynori7 wrote:
<form method="post" action="sendeail.php">

I think there's a typo in your filename, but that wouldn't be the problem.

It is in fact getting the data from all the inputs. Make use of echo's to debug and find where your problem is.
Code
echo $ip."<BR>".$httpref."<BR>".$httpagent."<BR>".$visitor."<BR>".$visitormail."<BR>".$notes."<BR>".$attn;



Put that line right after you pull in all the $_POST data and you'll see that all the data is there.


Might seem very minor, but it'd probably be easier to wrap the whole echo statement in double quotes. Variables are still parsed in double quotes :p, and you won't have to use ."".

Code
echo "$ip<BR>$httpref<BR>$httpagent<BR>$visitor<BR>$visitormail<BR>$notes<BR>$attn";


Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:52
GTADarkDude wrote:Do you actually know what each line in the script does?


All? No I don't. That's why (like I said before) I'm reading about PHP to learn about it. And that's also the reason I looked up this free php-form.

Thanks for the help everybody.


Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 18:54
erm4c wrote:
GTADarkDude wrote:Do you actually know what each line in the script does?


All? No I don't. That's why (like I said before) I'm reading about PHP to learn about it. And that's also the reason I looked up this free php-form.

Thanks for the help everybody.


If you need any help, drop me a PM. A mail script is extraordinarily easy. I could walk you through the steps and show you how to make a better, more secure mail form.
Author

RE: php help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-04-09 20:06
slpctrl wrote:
If you need any help, drop me a PM. A mail script is extraordinarily easy. I could walk you through the steps and show you how to make a better, more secure mail form.


Your inbox is full dude.

But anyway.. Right now I'm doing it with the script that I posted on the forum on my friends "test-page". This because I let him test it first and see if he really likes and needs it. IF he then decides that we'll put it in to the actual site in action I'll hit up with PM and ask for that tutorial. Smile




Edited by on 06-04-09 20:23
Page 1 of 2 1 2 >