Jump to content

liamthebof

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Everything posted by liamthebof

  1. Right, found out its a built in feature of opera to always cache pages. The only exception to this rule is if https is used. May aswell consider this solved, poor play on opera's front.
  2. Converted page to this: <?php header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <!--the rest of my page--> <body> <?php echo time(); ?> <a href="http://google.com">aaaaaaaaaaaaa</a> </body> </html> Still not working in Opera. Any suggestions?
  3. Where is edit post? Anyway, updated code: <?php header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); echo time(); ?> <a href="http://google.com">aaaaaaaaaaaaa</a> This works now for Firefox 4, IE8, Chrome 12. Does not work for Opera 11 however, any ideas?
  4. Hello, Hopefully a simple question. <?php header("Cache-Control: private, must-revalidate, max-age=0"); header("Pragma: no-cache"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); echo date('l jS \of F Y h:i:s A'); ?> ^^Does not work, except IE7 When I click on a link off of the above page, then hit the back button on the browser, I need the page to reload so that the new 'date' will be echoed. Must be multi browser compatible. Any solution appreciated, JS possibly? Thanks
  5. Found the problem, in the cookie surl settings, I need to chmod the cookie.txt files.
  6. Hello. Homeserver: (Works) phpinfo curl data: curlcURL support enabled cURL Information 7.19.4 Age 3 Features AsynchDNS No Debug No GSS-Negotiate No IDN No IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI Yes krb4 No libz Yes CharConv No Protocols tftp, ftp, telnet, dict, ldap, http, file, https, ftps Host i386-pc-win32 SSL Version OpenSSL/0.9.8k ZLib Version 1.2.3 Webserver: (broke) curlCURL support enabled CURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 I have full access to the webserver (Its a VPS0. I just don't know how to fix it.
  7. while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Inside Loop"; print_r($row); } Try that inplace of the while loop to check your query ect.
  8. $author = "rjanak"; echo <<<_END <pre> This is a Headline This is the first line. This is the second. - Written by $author. </pre> _END; Outputs what you require.
  9. Hello, I firebug a website and found a form posting to a .ashx page with non php parameters. .ashx : http://cheaperzone.com/ajaxpro/pureland.Buy.Buy,pureland.ashx post: {"Game":"WOW","Server":"Archimonde-Horde","ChangeMonkey":"1"} I tried to curl using: <?php $ch = curl_init('http://cheaperzone.com/ajaxpro/pureland.Buy.Buy,pureland.ashx'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"Game":"WOW","Server":"Archimonde-Horde","ChangeMonkey":"1"}'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $info = curl_exec($ch); curl_close($ch); echo $info; ?> The firebug response was: new Ajax.Web.DataTable([["Unit","System.String"],["Unit1","System.String"],["Unit2","System.String"],["Price","System.String"],["Price1","System.String"],["Price2","System.String"],["MoneyLogo","System.String"],["UnitName","System.String"],["InStock","System.String"]],[["50000G","50000","50000","$226.88","226.88","226.88","$","G",""],["35000G","35000","35000","$158.99","158.99","158.99","$","G",""],["30000G","30000","30000","$136.88","136.88","136.88","$","G",""],["25000G","25000","25000","$113.88","113.88","113.88","$","G",""],["20000G","20000","20000","$90.88","90.88","90.88","$","G",""],["18000G","18000","18000","$81.88","81.88","81.88","$","G",""],["15000G","15000","15000","$68.88","68.88","68.88","$","G",""],["10000G","10000","10000","$45.88","45.88","45.88","$","G",""],["9000G","9000","9000","$41.88","41.88","41.88","$","G",""],["8000G","8000","8000","$36.88","36.88","36.88","$","G",""],["7000G","7000","7000","$32.88","32.88","32.88","$","G",""],["6000G","6000","6000","$27.88","27.88","27.88","$","G",""],["5000G","5000","5000","$23.88","23.88","23.88","$","G",""],["4000G","4000","4000","$18.88","18.88","18.88","$","G",""],["3500G","3500","3500","$16.88","16.88","16.88","$","G",""],["3000G","3000","3000","$14.88","14.88","14.88","$","G",""],["2500G","2500","2500","$11.88","11.88","11.88","$","G",""],["2000G","2000","2000","$9.88","9.88","9.88","$","G",""]]) My echo was blank. Any ideas. Thanks.
  10. Ok, I've come to the solution the best way to approach this is the run the javascript functions myself and extract the data. Quite likely an awkward job. If anyone knows a better way please do say. Thanks
  11. Shameless bump. I'm still having no luck. Is this actually possible?
  12. Hello I was looking to do a page scrape of a site: Heres the link: http://www.cheaperzone.com/Buy-WOW-Gold/WOW-Aggramar-Alliance-Gold.Html Basically, viewing the source seems to show old irrelevant prices of gold. The new data is updated using javascript and asp. I TamperData'd to see the post data, but that still doesn't help me to retrieve the values of price per quantity gold. What do you recommend? Thanks.
  13. The swf changes based on the FlashVars I pass to it. Furthermore, yes, I do need some form of screenshot of the swf output though I am running off a linux machiine.
  14. Hello once again. My latest en devour requires me to produce an image of a static .swf that is embedded on a page. Unfortunately, it has a selection of variables passed to it. Eg <object width="90" height="175"> <param name="exaple" value="example.swf"> <param name="AllowScriptAccess" value="always"> <param name="FlashVars" value="Lotsofnumbers=lotsofthings"> <param name="scale" value="noscale"> <embed src="example.swf" width="90" height="175" AllowScriptAccess="always" FlashVars="Lotsofnumbers=lotsofthings" scale="noscale"> </embed> </object> Ive had a look at the swf library but nothing stood out as useful. So, my question is, how can I get some form of screenshot image of the swf file using php as my first choice, though if you know a better using some other technique, please say an I will have a look. Thanks.
  15. OK, the key was in the login2, thank-you very much. I am not sure why, as login displays a login form, but it works so thankyou.
  16. Its stays on index.php. On another note, I think this may be related. This is an example of the cookie received when using liveheaders. Cookie: PHPSESSID=5c8febe59114b15ee507b1e032958ec6; SMFCookie463=a%3A4%3A%7Bi%3A0%3Bs%3A2%3A%2243%22%3Bi%3A1%3Bs%3A40%3A%22b56f140351f568fd7894418dc6dab2b18fef755c%22%3Bi%3A2%3Bi%3A1434907814%3Bi%3A3%3Bi%3A1%3B%7D Furthermore, my cookie.txt file is not being edited.
  17. Hello, yet again. I am making another php script which requires a login to get the page a data I require. I have used cUrl before, but I still do not know very much. I used Live headers to get the required postfields but still no luck. $url = "http://xxxxxxx.net/index.php?action=login"; $post = "user=xxxx&passwrd=xxxx&cookieneverexp=on"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); //curl_setopt($ch, CURLOPT_HEADER, 1); //curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo $output; The output is the login page with nothing changed. Not logged in, no 'incorrect password'. Ect. Any ideas. No doubt there is a very easy solution. Another note, it is a SMF forum, if that makes a difference.
  18. Also, it sounds as though you are using a basic php editor. I would recommend using Dreamweaver or phpDesigner as they would pick simple faults up in an instant. Up to you though, I do become lazy using phpD.
  19. Hello PHPF, I am having a problem with GDlib ini PHP. When using imagettftext(), I cannot seem to create crisp text, a form of smoothing/aliasing seems to be enabled. I have negated the color index, but the output is still too blurred to be useful for me in creating a crisp text. Anyone know how to make a work around to this? <?php $string = "A tester"; $width = 350; $height = 19; $img_handle = imageCreate($width,$height); $bg_col = ImageColorAllocate($img_handle, 200,10,10); $textcol = ImageColorAllocate($img_handle, 1, 1, 1); $size = 10; $font = "/visitor2.ttf"; $string_dim = imagettfbbox($size, 0, $font, $string); $x = ($width / 2) - (($string_dim[4] - $string_dim[6]) / 2); $y = 12; Imagettftext($img_handle, $size, 0, $x, $y, -$textcol, $font, $string); header('Content-type: image/jpg'); Imagejpeg($img_handle, "", 100); ?> This is the php output: And here is the expected, anti-aliasing free image: Thanks.
  20. Hello again. I was wondering, is there any way in any web scripting language to make a script capable of detecting whether a use has a certain file on there pc based on the directory you supply in the script? I've checked file-exists but as I know, that only checks the host. I was wondering if maybe there would be a javascript 'hack' using the browse box without displaying it. Im not sure really, so I have posted in the PHP forum as it's the language im most familiar with. Thanks.
  21. If that link is not being echo'ed, why bother escaping the "s?
  22. OK, got javascript helping me out so, the if's seem to be working. What Im currently stuck on is this $list = my stream get contents of an fopen'ed file. Echo'ed, works fine. $title is a $_POST.. from the form, echoed it, worked fine. Now, I need something that return TRUE if $title is found inside of $list. FALSE if not. I have tried preg_match and stristr but cant get either to work. Help appreciated.
  23. OK, I have a form containing: An input text title box. And input File upload box Another input text box for a size value. My form submits to a php page in an iframe contained on the same page as the form. The php page in the iframe should basicallytake the uploaded file, rename it, add the name of the title to a file called 'list.cfg', then, it should use gdlib to creat the words in title, place them on the image in the font size specofed y the value in the size text box. The image manipulation is fine, I have done all that side, it is currenty more complicated but know need for explanation. What I need to know is firstly, when submit is clicked, before ploading the image, has a name been enetered into title. Then, has the title been used before by reading list.cfg. If they all pass, upload the image and rename it as well as adding title to list.cfg. However, the form may be entered many time by a person adjusting the size of the font by entering a different value in the input size box. the idea is when they click submit, they will get a previw of current progress by showing the current state of the image. As the image file has already been uploaded, the script should be able to tell and when submit is clicked, it must not upload the image again but rather use the direcotry the image was uploaded to. I can do this by using file exists. What I cannot do is get the correct order of if()'s. The fact that the image may exist because someone else has already uploaded it, meaning the name will already be in list.cfg. The fact that the title may have been empty meaning the image shoulds not be renamed/moved. The fact that the name may exist already in the list.cfg and again the image should not be moved. The fact that the image should only be uploaded if its a png under 5 mb (I have that done, dont know where to place it). You see, im baffled. Help appreciated.
×
×
  • 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.