Jump to content

d22552000

Members
  • Posts

    535
  • Joined

  • Last visited

    Never

Everything posted by d22552000

  1. your one is a good program but it will be really slow (reply on top of mine) the preg and regular expression libraries are loaded every time it is requested and per funciton, expect it to take about a second to parse 3 variables (not a problem but if its a big form or with lots of people it might lag)
  2. one problem with your code: your modified date says GMT. this would only work if your system time was 0gmt. you have to apply your timezone change to it (- or + up to 12) I am PST (-8:00 GMT) If I loaded this page, it would say it was last modified 8 hours ago.
  3. if its as simple as his problem
  4. lol ok my problem is that I get random errors hwen I try to fopen.. I am makingg a web server and it reads the file based on the persons request it adds res:///PHP/ before the filename and this scrwes up the whole request. WHY DOES FOPEN ADD RES:///PHP/ BEFORE THE FILE ENTRY? (PHP 4.4.4)
  5. I could make one for you, I could make it free, it wouldnt look good (plain text and tables, video embed) but it would work . PM me if interested.
  6. How much more information do I need before I can get help!?!?!?!? uh.. php 4.4.4 using bambalam php compiler, im using windows xp vs.8987465765456497 compilation 2600 here is sysinfo: OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 OS Manufacturer Microsoft Corporation System Name INDRA System Manufacturer INTEL_ System Model D845GVSR System Type X86-based PC Processor x86 Family 15 Model 2 Stepping 9 GenuineIntel ~2666 Mhz BIOS Version/Date Intel Corp. VA84510A.86A.0023.P08.0309261501, 26/09/2003 SMBIOS Version 2.3 Windows Directory C:\WINDOWS System Directory C:\WINDOWS\system32 Boot Device \Device\HarddiskVolume1 Locale Canada Hardware Abstraction Layer Version = "5.1.2600.2562 (xpsp.040919-1030)" User Name INDRA\Administrator Time Zone Pacific Daylight Time Total Physical Memory 256.00 MB Available Physical Memory 55.75 MB Total Virtual Memory 2.00 GB Available Virtual Memory 1.95 GB Page File Space 2.23 GB Page File C:\pagefile.sys I use a shitty computer to program incase I screw somehting up.
  7. since you guys are being so "nice" il give you more information GET / HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */* Accept-Language: en-US UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) Host: 127.0.0.1 Connection: Keep-Alive is another example request to the server. I am trying to get the first line "GET / HTTP/1.1". I seperated it so each line is its own value $request[num] and each space seperated on line 1 is $header[num][ ALSO: [09-09-07_9:53:10] GET / HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */* Accept-Language: en-US UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) Host: 127.0.0.1 Connection: Keep-Alive\w is what my server logged it has good advanced logging.
  8. now only if people would actually use the god damned button, and if people would cctually help SOLVE PEOPLES PROBLEMS.  likke mine that ive been asking for a week, its a simple fopen thing but no help.
  9. Warning: fopen(res:///PHP/C:\): failed to open stream: No such file or directory in *\server.exe on line 19 Warning: fread(): supplied argument is not a valid stream resource in *\server.exe on line 20 Warning: fclose(): supplied argument is not a valid stream resource in *\server.exe on line 21 And $header[1] is: /index.html I get those things when I use the following code: **CODE SNIPPED** $input="";$output="";$header="";$request="";$value="";$path="C:/"; $input = socket_read($spawn, 1024) or die("Could not read input\n"); $input = trim($input); $request = split("[\n\r\t]+", $input); $header = split("[ ]+", $request); if ($header[1]=="/") { print "\n User Requested /"; } foreach ($request as $value) { $totalvar .="\t".$value; } $f = fopen($path.$header[1],"r"); $output = fread($f,filesize($path.$header[1])); fclose($f); **CODE SNIPPED** and my web browser acessing the web server returns: The webpage did not respond. Uh, so why do I get these? Why does it add "res:///PHP/" befroe the request?
  10. oh cmon please, this is all I needd then my web server workd (more or less) I just need to add php support .
  11. this would eb considered hacking the file cause people use zend defender on purpose and if it comes up blank make sure to update yoru zend optomizer otherwise dont use their code or get the author to fix it.
  12. Warning: fopen(res:///PHP/C:\): failed to open stream: No such file or directory in *\server.exe on line 19 Warning: fread(): supplied argument is not a valid stream resource in *\server.exe on line 20 Warning: fclose(): supplied argument is not a valid stream resource in *\server.exe on line 21 And $header[1] is: /index.html I get those things when I use the following code: **CODE SNIPPED** $input="";$output="";$header="";$request="";$value="";$path="C:/"; $input = socket_read($spawn, 1024) or die("Could not read input\n"); $input = trim($input); $request = split("[\n\r\t]+", $input); $header = split("[ ]+", $request); if ($header[1]=="/") { print "\n User Requested /"; } foreach ($request as $value) { $totalvar .="\t".$value; } $f = fopen($path.$header[1],"r"); $output = fread($f,filesize($path.$header[1])); fclose($f); **CODE SNIPPED** and my web browser acessing the web server returns: The webpage did not respond. Uh, so why do I get these? Why does it add "res:///PHP/" befroe the request?
  13. pelase check fopen error for my recent problem.
  14. would this work!!!?? $request = split("[\n\r\t ]+", $s); if ($request[2]=="/") { echo "You requested HOME"; } elseif $request[2]=="/*") { echo "You requested a file or directory: ".$request[2]; } else { echo "Your request was invalid"; }
  15. Is it possible to take input and seperate it on every certain character or regular expression? then split whats before to one string and whats after to another string? I am making a webserver and I need to seperate the first line of a browser request: "GET / HTTP/1.1" is an example call for root on the webserver "GET /file/index.html HTTP/1.1" is a call for index in file directory. I have seen people do it to seperate a string url: $url = "http://domain.com/file" turns into $url1 = "http://" $url2 = "domain.com" $url3 = "/file" but I wonder how they did it... can you please help me? I posted the topic earlier (12h ago) but it got buried.
  16. its an example application in bambalam php compiler. it has the source if you download: bambalam 1.31 (win32) (search google for it)
  17. well, it does. use png2jpg to convert the standard gd makes (create themand string their data to an array [1],[2] and so on) and then use png2jpg($gd[1],$gd[2]); for some reason it outputs a gif code under $gid[0]; os just echo that, it was hilarious when I did that for my vb captcha on april fools. the image would chang every half second or so, people were like WTF i cant loginzz!
  18. one comment about your insert, holy sh*t your databse willg et big quickly, if someone uploads a 1byte text file the table itself will be a few kbytes because of all those values... got the column that holds the file set to binary or blob? (important)
  19. (place the code plex so we can help u)
  20. Ya, im using sockets and php-win.exe to make a fully functional WEB SERVER!!! "PHP SUPPORTED" I have created everything so far, and I need help with the fnctinonality. so far I can acess the main page on both the local (1924) and remote (80) ports, but I need to be able to get the request: GET / HTTP/1.1 Accept: */* Accept-Language: en-US UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) Host: 127.0.0.1 Connection: Keep-Alive How would I get the first line of that and get / and everything after that (excluding spaces) ? I tried str_replace using regular expressions but that didnt work. What do I do?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.