Thanks for the reply jpadie. The purpose of this project is to connect to any server on the internet (server-side access and API isn't an option), and cURL doesn't really prove necessary in this case.
I got it to work :)
Problem was feof() only returns true when we tell the server to close the...
Hello all !
I'm developing a personal side project, and basically I need to get various bits of a remote file. I use the "Range" field in the HTTP request to accomplish this, and it's all working perfectly.
But, as I need various bits, initiating a connection, sending headers, getting...
I managed to solve it :)
My working code is:
if FileExists(f) = true then
begin
fs := TFileStream.Create(f,fmOpenReadWrite or fmShareDenyWrite);
fs.Seek(0,soFromEnd);
end
else
fs := TFileStream.Create(f,fmCreate or fmShareDenyWrite)...
You're right, it does work, I just didn't notice a stupid error (I already had the contents of the stream before calling Receive(Count) again :S dumb..).
But I have another problem now, the data I save isn't ok! I made a test with a button that, when clicked, would save the contents of...
Hey guys,
like the title says, I can't save an incomming connection's data into a file, or at least not the correct data: I managed to TFileStream it but the data was all garbled, and seeing the file in an hex editor showed the contents of the saved data are very different from the actual one...
I have defined a custom class:
type
TWhtv = class
one: string;
two: string;
end;
and the following code
function abc: TWhtv;
var
u: TWhtv;
begin
u.one := 'first';
u.two := 'second';
result := u;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
o: TWhtv...
I'm trying to build an ActiveXObject that mimics the behavior of a VCL component I have (non-visual, both VCL and ActiveX). What do I have to do to accomplish this ? I created a sucessfull example of an ActiveX that displays a message box when a custom method is called, but how do I make it...
Hello,
I've been trying to solve this problem for some time now, but with no luck ... I own a ASUS M6N and it has a set of special buttons/keys that perform specific functions around the laptop. I'd like to know how I can "hook" this special button keypresses so I can perform custom procedures...
Hello,
I have the following code:
<!--TestBegin12--> sjgidshgifdjhsdh <!--TestEnd12-->
<!--TestBegin22--> ssrvytybsgfhgfjh <!--TestEnd22-->
<!--TestBegin47--> fdhsfdjdfyhhsjfj <!--TestEnd47-->
<!--TestBegin2467--> asfsvffdjhsdh <!--TestEnd2467-->
and I need to match them with a preg_replace...
Well, at first sight it seams to have nothing to do with database related limitations, but a simple error in your code. "Unclosed quotation mark" is pretty self explanatory, it basically means you missed some quote/apostrophe. Make sure you have all opened quotes/apostrophes closed, and that you...
Hi,
First of all I'm a complete novice in bluetooth/symbian interaction.
I own a Nokia phone with bluetooth, and a bluetooth usb adapter. I can connect the phone to the pc without any problem, and do every task I'm supposed to be able to. My question is, is there any way I can "talk" to my...
also note that when setting cookies, they usually don't work if you use them too fast after setting them. i mean, if you set the cookie in the beginning of the code and then try to read it after it won't work, the same if you set the cookie and redirect to a page that will read the cookie...
dunno. but, you can always use functions already existing that escape all the needed chars, like htmlspecialchars(transforms all unusual chars into their html notation), addslashes(escapes unusual chars), urlencode(transforms unusual chars into their hex/url notation), etc. just start giving a...
Looking at your code the correct would be
[CODE]echo "<img src=\"$path/$fichier\">";[CODE]
that'd work.
jamesp0tter,
mr.jamespotter@gmail.com
p.s.: sorry for my (sometimes) bad english :p
$dest must also include the resulting filename
like : $dest = "images/file.zip";
jamesp0tter,
mr.jamespotter@gmail.com
p.s.: sorry for my (sometimes) bad english :p
and i assume you forgot to close the ' before ] :P
btw, $_GET is for the vars passed in the url (i.e. index.php?foo=bar), $_POST is for form fields, as well as $_REQUEST... so in your case $_GET would have to work ;)
jamesp0tter,
mr.jamespotter@gmail.com
p.s.: sorry for my (sometimes) bad...
Well, first you would need to use a "+" before the first "hello" so you know if you want the first word or not, like:
title=+hello+goodbye-stupid
Second, it's much easier if you separate each word, like this:
title=+hello|+goodbye|-stupid
That way, you can explode($_GET['title'],"|") and...
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.