Jump to content

hisoka

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by hisoka

  1. does the URL name of the website matter ? I prefer not to mention the URL name of the website this is why I replaced it with https://www.examples.com/index.php . I already , indirectly , referred that it is not the real URL name of the website . Something is wrong or missing in the little script above . I do not know what is exactly the problem.
  2. <?php$password="xxxxxxx";$username="yyyyyyy";$url="https://www.examples.com/index.php";$ch = curl_init();curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);$output = curl_exec($ch);echo $output;curl_close($ch);?> I changed the xxx by the real password , the yyy by the real username and I put the real url but I could not login to the website . please help
  3. hisoka

    php curl not working

    yes yes now it worked . all what I needed is to add this line : curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  4. hisoka

    php curl not working

    "If you want it to return the page then set that option." I still do not understand what do you mean exactly : I set it like this : <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com");curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$contents = curl_exec ($ch);echo $contents;?> but when I run the script , it gives nothing only a white page
  5. "In PHP, when you start a session, the cache limiter sends headers to tell the browser how to handle caching for that page. That's the answer to your question." yes this is the answer to my question : "But what has all this to do with a session ??"
  6. hisoka

    web caching

    Who says it's a web page? Maybe it's an image. Maybe it's a CSS file. It could be anything. Firefox keeps a database of everything so it can match things up with what it is looking for, but the cache is specifically designed to not be readable by people. If you were an attacker you could go into someone's cache and just start taking things to look at. Firefox probably stores them in a binary, maybe encrypted, format. THAT IS IT I used Cacheviewer Mozilla addon to see them
  7. hisoka

    php curl not working

    problem solved : php curl is not able to display the content of the sites using SSH that is https . It can only display sites that do not use SSH that is http : this is displayed: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://stackoverflow.com") $contents = curl_exec ($ch);echo $contents;?> meanwhile this cannot be displayed : <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com") $contents = curl_exec ($ch);echo $contents;?> Justsomeguy how can use curl php with SSH to let it display the https sites ???
  8. hisoka

    php curl not working

    Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure. 1 is true or success and 0 is false or failure therefore the script run correctly and succeed and the value of success is returned but I need the webpage to be displayed not the result of success or failure . Whatever I do I cannot let curl display the content of the webpage in my browser <?php $c = curl_init(); curl_setopt($c, CURLOPT_URL, "http://www.youtube.com"); $data = curl_exec($c); echo $data ; curl_close($c); ?> <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.youtube.com"); $contents = curl_exec ($ch);echo $contents;?> I am really stuck . Why I cannot get to let curl php in the above scripts to show youtube page content ?
  9. hisoka

    php curl not working

    Thanks to both of you now after some trying I solved the problem : now I see my load configuration file and curl enabled in my php info . Now after running this php script : <?php$ch = curl_init();curl_setopt($ch, CURLOPT_URL, "http://www.youtube.com");curl_setopt($ch, CURLOPT_HEADER, 0);$response = curl_exec($ch);print $response ;curl_close($ch);?> I got only 1 displayed I wonder why and how to make the youtube page displayed?
  10. hisoka

    web caching

    "You tried to open an "object"? What object? How did you try to open it?" The object I am talking about is mozilla firefox file stored in the hard disk as a result of browser caching there 5333 objects or files stored in a directory . when I double click one of them and choose to open it with firefox instead of the page being displayed , it is downloaded . So why I cannot open it with firefox if it is a web page stored in my hard disk !!? "I doubt it. That looks like an ID or hash, not encrypted data." a hash can be cracked
  11. "PHP will tell the browser to not cache pages that use a session, because the data on the page might change" I think all web pages the user visits use sessions to identify the user and his activities in that specific website and among them the web pages that are cached in the user computer .
  12. hisoka

    php curl not working

    "Make sure you are editing the correct php.ini file, there can be more than one, in phpinfo() look at 'Loaded Configuration File' that will tell the php.ini file it is loading." when I run phpinfo(); I got the follwing concerning php.ini: Configuration File (php.ini) Path = C:WINDOWS // the direct path to my php.ini is C:php and Loaded Configuration File= (none) Besides I got another error when I tried to run the above cur script again : php startup : unable to load dynamic library php_curl.dll . The specified module could not be found . the php_curl.dll is in my php/ext directory but php does not detect it
  13. hisoka

    web caching

    about:cache shows this : Information about the Network Cache Storage Service: memory Number of entries: 46 Maximum storage size: 18432 KiB Storage in use: 139 KiB Storage disk location: none, only stored in memory List Cache Entries disk Number of entries: 5333 Maximum storage size: 556 KiB Storage in use: 354675 KiB Storage disk location: ....... List Cache Entries appcache Number of entries: 0 Maximum storage size: 555555 KiB Storage in use: 0 KiB Storage disk location: ........... 46 objects are stored in memory 5333 objects are stored in hard disk the question is why ? why the 46 objects are not stored in disk or why some objects are stored in memory ? why not all objects in disk second question When I tried to open an object using Morzilla , the object (the page ) is not displayed but instead is a box appeared asking me to save file or open it with why ? I expect mozilla firefox to open it and to display the web page as it is cached !!? entry file proprieties : file name = 0A724800006600468900731UZT817C28DALL611B9 type = file description = 0A724800006600468900731UZT817C28DALL611B9 What is the hexadecimal number ? can the hexadecimal number be cracked to see its content ? and how to open the entry ?
  14. "By default, PHP saves session data using text files. The save path is the location where those files get saved." So session.save_path defines the path (location) of the files sessions . If I am wrong can you correct me ?
  15. Browser caching : Pronounced "browser cash." A temporary storage area in memory or on disk that holds the most recently downloaded Web pages. As you jump from Web page to Web page, caching those pages in memory lets you quickly go back to a page without having to download it from the Web again. In order to ensure that the latest page is displayed, the browser compares the dates of the cached page with the current Web page. If the Web page has not changed, the cached page is displayed immediately. If the Web page has changed, it is downloaded, displayed and cached. In computing, active data is often cached to shorten data access times, reduce latency and improve input/output (I/O). Because almost all application workload is dependent upon I/O operations, caching is used to improve application performance. For example, Web browsers such as Internet Explorer, Firefox, Safari and Chrome use a browser cache to improve performance for frequently accessed webpages. When you visit a webpage, the files your browser requests are stored on your computing storage in the browser's cache. If you click "back" and return to that page, your browser can retrieve most of the files it needs from cache instead of requesting they all be sent again. This approach is called read cache. It is much faster for your browser to read data from the browser cache than to have to re-read the files from the webpage. the caching mechanism is controled by set of rules that must be obeyed : If the response’s headers tell the cache not to keep it, it won’t. If the request is authenticated or secure (i.e., HTTPS), it won’t be cached. A cached representation is considered fresh (that is, able to be sent to a client without checking with the origin server) if: It has an expiry time or other age-controlling header set, and is still within the fresh period, or If the cache has seen the representation recently, and it was modified relatively long ago. Fresh representations are served directly from the cache, without checking with the origin server. [*]If a representation is stale, the origin server will be asked to validate it, or tell the cache whether the copy that it has is still good. [*]Under certain circumstances — for example, when it’s disconnected from a network — a cache can serve stale responses without checking with the origin server. If no validator (an ETag or Last-Modified header) is present on a response, and it doesn't have any explicit freshness information, it will usually — but not always — be considered uncacheable. Together, freshness and validation are the most important ways that a cache works with content. A fresh representation will be available instantly from the cache, while a validated representation will avoid sending the entire representation over again if it hasn’t changed. These rules are defined by : Cache-Control HTTP Headers which in turn are defined by : The cache limiter But what has all this to do with a session ??
  16. hisoka

    php curl not working

    I did as you told me : error_reporting = E_ALL (uncommented)display_errors = On (uncommented)log_errors = On (uncommented)display_startup_errors = On (uncommented) saved change and restarted apache . Then I checked the error file in logs directory which is in apache2.2 directory C:Apache Software FoundationApache2.2logs and all what I could get is this error : [Tue Jun 09 18:22:23 2015] [error] [client 127.0.0.1] File does not exist: C:/Apache Software Foundation/Apache2.2/htdocs/favicon.ico and of course the Fatal error: Call to undefined function curl_init() in C:Apache Software FoundationApache2.2htdocs10.php on line 3 error I am really confused and I need help
  17. I read but I could not understand as this is too complicated for me : The cache limiter defines which cache control HTTP headers are sent to the client. These headers determine the rules by which the page content may be cached by the client and intermediate proxies. Setting the cache limiter to nocache disallows any client/proxy caching. A value of public permits caching by proxies and the client, whereas private disallows caching by proxies and permits the client to cache the contents. and this is worser than the first session.save_path defines the argument which is passed to the save handler. If you choose the default files handler, this is the path where the files are created. See also ...... you have other articles that are simpler than that ? or may be you can simplify the above for me
  18. I have apache 2.2 installed in my computer os = windows xp 32 php version is 5.9.9 I tried to use php curl like this : <?php$ch=curl_init();$url1 = "http://www.facebook.com";curl_setopt($ch , CURLOPT_URL , $url1);$response = curl_exec($ch);print $response;curl_close($ch);?> However when I run the above script , I got this error : Fatal error: Call to undefined function curl_init() in C:Apache Software FoundationApache2.2htdocs10.php on line 3 So I follwed this article http://artofsimplicity.co.uk/php-5-2-14-curl-not-working-on-windows/ but my problem was not solved and I still got the same error . I did all the five steps in the article : 1) extension=php_curl.dll is uncommented 2) the php installation directory is in my path environment 3) ssleay32.dll and lbeay32.dll are in the php directory and in my path 4) checked phpinfo(); and I can’t see an entry for cURL listed there. 5) I restarted apache again and the problem persisted plus the sixth from the article : 6)I replaced the broken DLL with one from a previous version of PHP after all that I failed and the error remained Fatal error: Call to undefined function curl_init() in C:Apache Software FoundationApache2.2htdocs10.php on line 3
  19. hisoka

    php curl

    What is the function to set the maximum time for sending data to a website using php curl ? is it CURLOPT_TIMEOUT_MS? or another php curl function ?
  20. what is a cache limiter ? and what does it mean :"cannot send session cache limiter"? finally what is session.save_path ?
  21. pagespeed_url_hash=2538945255 I do not know and I cannot understand what is this : pagespeed_url_hash what is it ?
  22. wonderful , you are the welcome justsomeguy
  23. I know for example what does this mean index.php?id=mark&pass=admin but what does the double ampersand in the url mean ? index.php?id=mark&&pass=admin
  24. this confuses me a lot : <!--webbot bot="ImageMap" startspan rectangle=" (252,0) (338, 13) ../CAIBCO/Enlacesa.htm#Escorpiones" rectangle=" (5,1) (58, 13) ../CAIBCO/Eventos.htm" rectangle=" (67,0) (138, 17) ../CAIBCO/Articulo.htm#Escorpiones" rectangle=" (341,2) (420, 15) Bibliogr.htm" src="Barraesc.gif" border="0" width="421" height="22" --><MAP NAME="FrontPageMap0"><AREA SHAPE="RECT" COORDS="252, 0, 338, 13" HREF="../caibco/enlacesa.htm#escorpiones"><AREA SHAPE="RECT" COORDS="5, 1, 58, 13" HREF="../caibco/eventos.htm"><AREA SHAPE="RECT" COORDS="67, 0, 138, 17" HREF="../caibco/articulo.htm#escorpiones"><AREA SHAPE="RECT" COORDS="341, 2, 420, 15" HREF="bibliogr.htm"></MAP><img src="barraesc.gif" border="0" width="421" height="22" usemap="#FrontPageMap0"><!--webbot bot="ImageMap" i-checksum="46932" endspan --></td> what does this in plain english mean : <!--webbot bot="ImageMap" startspan rectangle=" (252,0) (338, 13) ../CAIBCO/Enlacesa.htm#Escorpiones" rectangle=" (5,1) (58, 13) ../CAIBCO/Eventos.htm" rectangle=" (67,0) (138, 17) ../CAIBCO/Articulo.htm#Escorpiones" bot="ImageMap" i-checksum="46932" endspan --></td> ???
  25. hisoka

    .cnf extension

    I read some articles about cnf extension file . However I am still unable to understand what is this cnf file extension in a simplified way . It really confuses me this .cnf . I need help
×
×
  • Create New...