sDJh 39 Posting Whiz in Training

Hi,

perfect hint: http://www.php.net/manual/en/reserved.variables.server.php. It's the manual for all information concerning your visitor. Look at "REMOTE_ADDR" for the IP-address.

To lock an account you simply count how often the user tried to log in in with a wrong ID. Simply place a file into a temporary folder named with the IP-address and save the time and date of the login (or even better unix-time: time()). If the time gap is lower than say 15 minutes you simply put a flag "locked" to your database or whatever system you're using for your accounts.

sDJh 39 Posting Whiz in Training

Yes, they can. You can actually do all stuff Google has done in their products apart from dynamically changing the content of your webpage without reload. You then need to work with JavaScript.

sDJh 39 Posting Whiz in Training

Yeah. Have you GD installed? Check that and look on http://php.net for some help.

sDJh 39 Posting Whiz in Training

Hi,

you simply check the data from your SQL-result and place it in the HTML-Form. Eg:

<input type="text" value="<?echo $row[0]?>">

as row is the fetched row of the query. When using fetch-array it's kind of

<input type="text" value="<?echo $arr['email']?>">

or whatever, but I'm not really used to that (I'm very very old school, I know).

Hope that helps. Feel free to ask more, if you still struggle.
Simon

sDJh 39 Posting Whiz in Training

Hello altogether,

basically, modern filesystems like HFS+ don't need to be defracmented. And nevertheless, that shouldn't be the bottleneck of you problem as far as I can see.

Why do you want to use Norton? It's well known that it's slow and very much out of date.

When you have an old computer, Mac OS X is simply to heavy for it. Version 5 (Leopard) needed around 500 MB of RAM just for the system.
What you could try is to reduce all system tools to a minimum (look in the net).

Scan your disk with disk-utilities (or whatever it's called under 10.2) and try to figure out the problem with your tif-files. Maybe they're damaged instead of the partition. If all fails, you shoud think of formatting and reinstalling the system completely as stevenros suggested.

For a good device, go into your system-monitor and look which programme uses most ressources. You can then backcheck the internet if you need that tool or how it can be reduced.

Hope that helps a bit, Simon

sDJh 39 Posting Whiz in Training

Hi jsepeta,

there are two possibilities (I can think of right now).

1) Try http://www.virtualbox.org/
Don't know if it's working under Lion. Don't know if you can virtualize Mac on Mac. But have a look and search a bit with google and Co.

2) Make a second partition with Disk-Utilities (or whatever it's called). Then you can install an old version of Mac OS X on that part. You just have to restart the computer everytime you want to change the OS.

3) Are you sure that there's no product update for newer OSX's?

Hope that helps, Simon

sDJh 39 Posting Whiz in Training

Hi,

swftools is free software for all major OSs. Using Windows or Mac you can get a precompiled package there. Under Linux, most distributions have swftools already in there repositories. I installed that long ago on all three platforms, and as far as I can remember it wasn't complicated at all.

Having installed that you can use that software via command-line (eg. cmd.exe under Win). Then have a look how the programmes are used. It will be something like

swfextract -o myimages swffile.swf

. Just fiddle around a bit (it's fun).

You can then use what ever arguments you figured out in PHP via the command

system()

(http://www.php.net/manual/en/function.system.php).

This all may sound a bit spooky at first, but it's not really rocket-sience. And if you need help, feel free to ask again (or even write a PM - as I'm currently quite stressed).

Hope I could help you now, dude.
Simon

sDJh 39 Posting Whiz in Training

Hi rpv_sen,

I'm sorry to say, but in my point of view, you haven't.

Not getting access to a FTP-server does not necessary be a fault of PHP.

For some good advice, we actually need more details.
1) The correct server address
2) does it work with file-zilla
3) what about your firewall?
4) anything installed correctly
etc

As I said before, this problem can be caused by almost anything thinkable.

Greetings

sDJh 39 Posting Whiz in Training
faroukmuhammad commented: thats what i 've in mind +4
sDJh 39 Posting Whiz in Training

Hi,

as much as I know, you can use the function

loadVariables(url, "_root.response", "GET");

in your flash file. In PHP you simply embed your flash-file with arguments like

"file.swf?arg1=..."

.

Try that out. If it's not working then feel free to ask again.

Hope that helps, Simon

sDJh 39 Posting Whiz in Training

Hi divyakrishnan,

for me it seems as if you're using Windows. Simply try

$file='\\\\\\\\HOSTNAME\\file.txt';

. As I'm mainly using Unix, I don't know exactly how the address-structure looks like in a Windows-Domain. But as long as you mask you slashes correctly, it should work perfectly when you use the address given by the explorer.

Keep in mind that this does only work, when the server let's you out of the sandbox. In real-server-mode you do get trouble. You can then install an other webserver and access the data via

$file='http://iii.iii.iii.iii/filename';

. For me that's a much cleaner solution.

Hope that helps, Simon.

sDJh 39 Posting Whiz in Training

is your subdomain pointing to a sub-folder of your server? I bet so? So why not simply putting that htaccess-file there?

sDJh 39 Posting Whiz in Training

I advice you to have a deep look into your code or in the internet. This problem could be caused by anything. You could have a typing error, or try to connect to a computer without ftp-server, or your extension doesn't work or your firewall, router...

What about connecting to that computer via a ftp-client?

sDJh 39 Posting Whiz in Training

Hi,

this should easily work with SWF-Tools (http://www.swftools.org/). It's a community open-source project with very good reputition already. It's really worth a try!

Greetings Simon

sDJh 39 Posting Whiz in Training

how about having a look at the generated HTML-Output? That helps you to understand the problem.

sDJh 39 Posting Whiz in Training

Have a look at the funktion "mktime()" on php.net. It is a very poweful yet simple function for date and time calculations.

sDJh 39 Posting Whiz in Training

hi

i you're using the xml-version of an excel file it should be at least reasonably simple. If not, I actually think that you're getting into deep trouble.

There are basically three ways.
1) Take some money and buy a professional solution.
2) Google very long in the net and try to get enough code snippets.
3) have a look at http://www.wotsit.org/ and try to understand xls on your own. The good thing is, if you really get your script to work, you can easily sell it yourself.

PS Is it neccessary to use excel?

sDJh 39 Posting Whiz in Training

Well have a look in you other post.
Sorry to say that, but grab yourself a book and learn assembly if you really want to. There's no help for anyone asking the most simpliest questions. Learing assembly is pure pain and on have to be very serious when doing so.

sDJh 39 Posting Whiz in Training

You have to write that yourself. If you don't want to, than stick to a higher language.

Write a procedure that compares two strings. You need a loop that compares each byte in the strings. If all values are identical, then you can set the equal-flag, if not not you clear it.

sDJh 39 Posting Whiz in Training

I dunno what the code above actually does. My first idea for an approach would be to loop through a string until I get a "0" (like line 9) and increment a counter everytime a get a space. That's all.

Start debugging your code. Set breakpoints and some short outputs in your source to see where the crash exactly occurs.

sDJh 39 Posting Whiz in Training

Why don't you simply fetch the errpor-output of mysql http://php.net/manual/en/function.mysql-error.php? So in case something goes wrong you can still undo the paying.

sDJh 39 Posting Whiz in Training

have a look at scanimage: http://www.sane-project.org/man/scanimage.1.html. You could probably access via PHP as well, but I'm not sure. I imagine the scanner be connected directly to the host (also via LAN to access a device on the local machine => see manpage) and with a web interface you could view the images.

But I've to agree with all posters before: PHP is maybe the very worst choice for that kind.

sDJh 39 Posting Whiz in Training
a[index_1][index_2]=newvalue;

or you look here: http://de3.php.net/manual/en/language.operators.array.php

sDJh 39 Posting Whiz in Training

1) 0x80 + 0x40 = 0xC0
0xC0 > 0x80 => setting the signed flag

2) 0x80 + 0x80 = 0x(1)00
Cannot represent numbers greater than 0xFF => setting Carry
MSB cleared, so Overflow set
0x00 => Setting the Zero

3) 0xC0 + 0xC0 = 0x(1)80
Cannot represent numbers greater than 0xFF => setting Carry
0x80 => MSB set => negativ => Sign set

That's my guess.

sDJh 39 Posting Whiz in Training

ASM is the purest developing language available. It just translates Mnorics to hex code. The good thing is you can control up to 100 percent what your CPU is supposed to do.

CPUs dont distinguish between signed or unsigned variables. They don't even know the difference between datatypes. CPUs do whatever you want them to do.

So if you want to diplay bytes signed, you have to write your own procedure for that. In C this is done by testing the highest (7th) Bit of the Byte. If it's set to 1, then you have a negative number. If not, than it's positive.

sDJh 39 Posting Whiz in Training

I really don't get it! It's mainly these arrogant expressions against users of different OS. Just to point out: Having configured Windows correctly, it will be as secure as Linux and as Mac. And in my opinion, it even more secure in most cases, because it's simpler to adapt than Linux for instance. Do you all get paid by Apple? And how can join? Please contact me and I'll give you my bank account number.

I am developing software, and I can tell you how easy it is to corrupt a system. A virus doesn't need to destroy the system folder. Isn't it enough when it simply deletes all pictures in your home directory? And who of you all uses a different account for mail, pictures and browsing. Guess there aren't many.

So for all of those who still uses a bit of brain even when using a mac, go on page two, have a short glance at my post there, and take 15 minutes to tidy up your mac. Hopefully you will never get into a situation that causes damage to your system, but if you do, you'd be glad having followed some security advice.

Amen.

sDJh 39 Posting Whiz in Training

Hi kroche,

why are you doing it so difficultly? To create a file out of the output of PHP, you just can access the file via http://. It even works with copy(), if just tried out.

So, for instance. You have your layout-page that includes some kind of data given by the user:

<html>
<head>
<title><?php include("./tmp/title".$_REQUEST['id'].".txt");?></title>
</head>
<body><!--some very cool top layouts.--!>
<?php
include("./tmp/header".$_REQUEST['id'].".txt");  //lets assume you saved the user's 
include("./tmp/content".$_REQUEST['id'].".txt");  //lets assume you saved the user's input here
?>
</body</html>

Now, when you use copy(), PHP first executes the script and returns the processed text. Simply pass the id to the script.

<?php
copy("http://localhost/layout.php?id=".$_GET['id'],"./online/".$_SESSION['pages'][$id]['content']);
?>

I haven't tested it, but I'm quite confident, that this should basically work.

The only thing that you have to do is to save the data in the setup to files instead of a session. If you like you could also work with sessions but then you have to pass all arguments to the script when using copy.

Hope that helps you.

sDJh 39 Posting Whiz in Training

To be honest with you, I'd expect these kind of posts if I was in linux forum. It's fine, and make me personally also happy, to hack your computer under linux. But when I pay fantastillians of bucks for a computer, I just expect it to work. And if it doesn't I call the hotline so long, until the problem is solved. Sorry, but buying software (and support!) today, means for me that one can rely on it.

Nevertheless, dioioib and macmad, you might be right. It's actually worth a try. I just can remember having had a very strange problem with my keyboard, and a hard-reset on boot let my mac work properly again.

sDJh 39 Posting Whiz in Training

Use the apple hotline. Something seems to be very corrupted.

sDJh 39 Posting Whiz in Training

@jordan: That should definately work, but you have to prepare your mac to boot linux (http://refit.sourceforge.net/).

@urmyt0y: What filesystem have you used under windows? NTFS should work actually (read-only). But with a 3rd-party plugin you can fully access NTFS.
Why don't you just ask a friend to copy the stuff on a new HD?

sDJh 39 Posting Whiz in Training

Hi kroche!

As simple as that:

<?
$f=file("http://localhost/test/test.php");
for($x=0;$x<count($f);$x++){
	echo $f[$x];
}
?>

Whereas "test.php" is your PHP file that you want to save. And instead of doing an echo, you simply open a file for writing and put all that content in it. Voilà.

sDJh 39 Posting Whiz in Training

when using imagecopy, you have to allocate the image before copying. In your case you copy it somewhere (hopefully PHP catches that bug!).

else
				{
//create your empty image here.
					$image = @$imagecreate($phpbb_root_path.$sprites_path.'/'.$HTTP_POST_VARS[$Lrow['name']]);
					@imagecopy ($sprite_1, $image, 0, 0, 0, 0, $tot_width, $tot_height);
					@ImageDestroy($image);
				}

this is all I can think of in the moment. TIP: Comment imagepng and remove all the @, so that you get a proper error report.

sDJh 39 Posting Whiz in Training

???

1) PHP is universal for all major OSs
2) Using PHP as a server language CANNOT process dynamic data! And if you don't want to use it as a server language, go for C++, Fortran or any BASIC-dialect.
3) if you really intend to do in in a browser, than have a look at the ActionScript API.

sDJh 39 Posting Whiz in Training

I totally agree with jkon. Five minutes of research in the net would be enough to find answers to most of your questions.

> do i need to learn another lamguage or php is okay.
No, PHP can't do that.

> will i need flash??
If you like.

> how can i acccess the webcam from a web page.
Not at all (at least when you configured your computer properly)

> please give me the adreess of anywebsite you think it can be helpful to me
No problem: www.google.com

sDJh 39 Posting Whiz in Training

You always have to use "header()" before you generate any output. With the first output, PHP sends automatically the standard-header which cannot be manipulated afterwords.

And why do you output the generated text in an image? Remember, that the output of the php-script will be treated as an image! If you want to log each steps of your script for debugging purposes that you better open a file to write and log your stuff in there.

OK, Zero fast faster.

sDJh 39 Posting Whiz in Training

You can use AJAX. Have a look for some tutorials. Also you can get some more information in the AJAX-Forum on Daniweb.
Regards

sDJh 39 Posting Whiz in Training

at the end of your code:

<?php
for($c=0;$c<8;$c++){
  if(isset($_FILES['uploaded_file['.$c.']'])) {
    if($_FILES['uploaded_file['.$c.']']['error'] == 0) {
      //put all your current code here
    }
  }
}//end of loop

echo "Click here to go back";
?>

That's it. Haven't tested it, but it's not hard work to update your code.

sDJh 39 Posting Whiz in Training

you need the MBR signature. Make your fill-up 2 Bytes shorter and put an 0xAA55 at the end of the file. Have a look here: http://en.wikipedia.org/wiki/Master_boot_record

sDJh 39 Posting Whiz in Training

Erm, just put more than one file-elements in your HTML-script. the very simplest way of doing so is to make the name of the fields an array:

<form action="add_file.php" method="post" enctype="multipart/form-data">
        <input type="file" name="uploaded_file[0]"><br>
        <input type="file" name="uploaded_file[1]"><br>
        <input type="submit" value="Upload file">
    </form>

In your PHP-file you just have to add a loop that controls the values of each given field. Eg:

for($c=0;$c<8;$c++){
if(isset($_FILES['uploaded_file['.$c.']'])) {
 
    if($_FILES['uploaded_file['.$c.']']['error'] == 0) {
...

That's all. Hope it helps.

sDJh 39 Posting Whiz in Training

what do you wanna hear?

you can have general purpose registers like EAX, EBX etc, segment registers like CS, DS, SS and so on, memory data like [storage], immediately data like $FF or a vector to a label (eg JMP somewhere).

If I haven't forgotten anything, than that's all you have to know.

sDJh 39 Posting Whiz in Training

then you can use the PHP-PDF-function. I used them a couple of years ago and didn't find it too difficult to get into it. After a day of work you should have quite a proper image of how to use them. Have a look at the official documentation:

http://www.php.net/manual/en/function.pdf-open-file.php
http://www.php.net/manual/en/function.pdf-begin-page.php
http://www.php.net/manual/en/function.pdf-add-textflow.php

Hope that helps.
Simon

sDJh 39 Posting Whiz in Training

Basically it just makes sure that the assembled byte-code starts at "ORG". If you want to have a running COM-file under MS-DOS for instance you need exactly 100h of free mem for stuff like stack, commandline-arguments etc provided by DOS. And as this command just makes sure that IP points directly to the beginning of your code at the start of the execution. How should the computer else find out when there's no code given in the first 256 Bytes?

sDJh 39 Posting Whiz in Training

how about writing all that stuff directly to a file?

echo '<span class="pink">' . $row['q_quote'] . "</span>";
fwrite($file,$row['q_quote']);

Now you just have to provide a link to your output-file so that the user can download the stuff.

sDJh 39 Posting Whiz in Training

Hi Swiftle,

I am not sure if I got you right. And I haven't tried out what I am telling you. So please verify the stuff I'm just writing down.

When you call a procedure, CALL simply pushes the address of the very next instruction onto the stack. Now the trouble actually begins. Because you have to distinguish between quite a few possibilities:
1) the address might be eight byte long running a 64-Bit programme. I just take, that this not the kind stuff you want to do. So we forget this one.
2) if you're calling a far label (which is simply a procedure that is out of you current segmentation - so further than 65.536 Bytes of your CS) then you definitely have 32-Bit (four bytes) pushed on the stack.
3) if you're calling a procedure within your current segment (which is very likely your case) than you just have 2 bytes pushed on the stack.

You can actually simplify things. Let's take you're writing a 32-Bit programme for the sake of ease. I you're putting a "FAR" right after "CALL", you can make sure that always 4 Bytes are pushed on the stack (please verify that!).

Now that you've found out how many bytes are needed for "RET", you know how to access the provided arguments. The arguments start at "[ESP-usedBytes]". So having provided a "FAR", the arguments always start at "[ESP-4]".

So, to put all stuff into code:

sDJh 39 Posting Whiz in Training

Don't you think that are bit few information? What do you actually want to hear? You could have a problem with your harddrive. Or a virus running. maybe even your firewall makes trouble. Or windows.

I guess you do have a problem with your upload. Maybe you're accessing the picture before PHP has fully written it to the harddrive. Or PHP hasn't got permission to read the data.

Provide more specs to get useful help. This is just impossible to solve.

sDJh 39 Posting Whiz in Training

I guess it's one of these "standart-cookie-problems" with IE. I just can give you some advice how to break down the pain:

1) find the code where a cookie is set or a session is started
2) isolate that stuff in a new file and get it working under FF
3) now run that script under IE and find out what the problem might be (Cookie's expiring too early? Cookie not event set?)
4) get some information and paste them here, if you still can't explain the mess

Don't get me wrong, it's just impossible to deal with browser-problems without any further information.

sDJh 39 Posting Whiz in Training

I think we actually need more information about this. The problem itself is quite simple, though: the condition "if (in_array($fileType, $image_array))" is not met.

Start debugging you code:
make an output of $fileType and $image_array right before the condition and let the code run under FF and IE. I guess you'll then already see the problem. If you still have trouble, then paste the output here.

Greetings Simon

sDJh 39 Posting Whiz in Training

???

I think you're totally off the track. Whatever you want to do: HTML can never ever output anything as well as PHP can't display anything.

If you want to so an output of data submitted by a user you have to do it exactly the other way round: Create a HTML-file with a nice form and set the 'action'-tag of '<form>' to your PHP-file.
In the PHP-file you can now see the input of the user.

Eg
The HTML-file

<form method="post" action="output.php">
<input type="text" name="userinput">
<input type="submit">

The PHP-file

$userinput=$_REQUEST["userinput"];
echo $userinput;

Open the HTML-file, fill out the form and click on "Submit".

sDJh 39 Posting Whiz in Training

I guess that getlinks() returns an array with all links in a page. So if you go through that array with a for-loop you can simply save them in a database with a regular SQL-expression.

sDJh 39 Posting Whiz in Training

Well then, why do you use PageSpeed? I actually never heard about that before and having had one minute a look at it, it doesn't really make sense to me. For the most simple way to find out how fast you code really is, use the function microtime() (http://de3.php.net/manual/en/function.microtime.php) after let's say 25 lines of code. That will give you a very good picture of each part of your code that is executed and helps you to concentrade on these parts that are slow.

If you still want to use Google, you could try to find the line in the header that is set by Google and then remove it manually. Have a look here for a list of all headers that a currently in the buffer to be sent: http://de3.php.net/manual/en/function.headers-list.php and here to remove it: http://de3.php.net/manual/en/function.header-remove.php . But this is in fact quite a nasty hack. Go and find out if that really works, but I would not be surprised if it actually doesn't.

Hope that helps.