jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
Try, ini_set('display_errors',1); ini_set('display_startup_errors',1); ini_set('output_buffering','Off'); error_reporting(-1); $context = stream_context_create(array('http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => http_build_query(array('query' => '71.44.87.55')) ))); $fp = fopen("http://www.iplocation.net/index.php", "r", false, $context); $meta = stream_get_meta_data($fp); $headers = $meta["wrapper_data"]; //print_r($headers); $content = ''; while(!feof($fp)) { $content = fread($fp, 4096); echo $content; } fclose($fp); If you want to get (use) all css, js, pictures, etc, from their web page, set the base html tag inside the head tag of the document. For example: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>IP Location Finder - Geolocation</title> <meta name="keywords" content="ip, ip address, find, find ip, location, router, dns, reverse, tcp/ip, lookup, traffic, traffic analysis, your address, dynamic, change, isp, internet, provider, inet, net, localhost"> <meta name="description" content="How do I find a geographical location of an IP address?"> <base href="http://www.iplocation.net/"> <link rel="stylesheet" href="./style.css" type="text/css"> <link rel="SHORTCUT ICON" href="./favicon.ico">
-
It sounds like you're looking around something like object relational mapping (ORM) libraries in PHP. Google -"Doctrine Project".
-
Is getting a PHP/Programming Degree Important?
jazzman1 replied to mostafatalebi's topic in Miscellaneous
It might be worth to get some construction certificate as well -
Nothing, it works just fine to me. Do you have php's error_reporting set to E_ALL and display_errors set to ON so that any php detected errors will be reported and displayed? EDIT: Try, <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); ini_set('output_buffering','Off'); error_reporting(-1); $context = stream_context_create(array('http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => http_build_query(array('query' => '71.44.87.55')) ))); $fp = fopen("http://www.iplocation.net/index.php", "r", false, $context); $meta = stream_get_meta_data($fp); $headers = $meta["wrapper_data"]; print_r($headers); $content=fread($fp, 8000); fclose($fp); echo $content;
-
Do you know how to send POST or GET data filling input fields on the html form in cURL? To get the cookies from the server you shoud use CURLOPT_COOKIEFILE to read cookie and CURLOPT_COOKIEJAR to write down the cookie on the file. Also, you have to show us how you desighed the server side code Do you want to give you few examples of that?
-
Unable to get error message from move_uploaded_file
jazzman1 replied to LLLLLLL's topic in PHP Coding Help
It's imposibble! Did you restart your web server to make those changes available? Check this out -> http://www.php.net/manual/en/features.file-upload.errors.php Yes, that's correct. The post max size should be greater or equal to max file size. Use javascript to inform the client if the file is to large, so don't waste the server's resources.- 4 replies
-
- php
- move_uploaded_file
-
(and 1 more)
Tagged with:
-
Hm....no idea...sorry for that. EDIT:: Are you able to read the logs of the CentOS machine?
-
Me too. I'm a big linux fan Does SeLinux have enforcing status at the moment? Can you give me the output of: sestatus And this one too: getsebool -a | grep httpd
-
Now, try what mac_gyver suggested you at the first reply. Open up the php.ini file and find and change the line output_buffer = 4096 to output_buffer = Off and restart the web server. Or try this: <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); ini_set('output_buffering','Off'); error_reporting(-1); $fileName = "log_microsoft.txt"; $downloadURL = "https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx"; $handleOut = fopen($fileName, "w"); $handleIn = fopen($downloadURL,"r"); while (!feof($handleIn)){ $content = fread($handleIn, 8192); print_r ($content); fwrite($handleOut,$content); } fclose($handleIn); fclose($handleOut); You still doesn't give me an answer - what server are you using (operating system)?
-
As far as I know if cURL return 0 that's just fine Did you change the server platform or only php version? What server are you using right now?
-
He should bind this IPv6 to the mysql server conf file as well to be able to use it. Here is a part of mine db server: ( mysql 5.5/ CentOS 6.4) [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock bind-address = :: // connection [lxc@lxc1 ~]$ mysql -h ::1 -u lxc -ppassword --port=3306 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.35 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
-
Then, try something like (not tested): $wallsql= $conn->prepare('SELECT * FROM activity f INNER JOIN wp_bp_friends n2 ON (n2.friend_user_id=f.user_id OR n2.initiator_user_id=f.user_id) WHERE n2.initiator_user_id = :userid ORDER BY f.datetime DESC LIMIT 8'); $wallsql->bindParam(':userid', $_SESSION['uid'],PDO::PARAM_INT); $wallsql->execute(); PS: Perhaps, Barand will give you a better idea tomorrow morning
-
60 seconds is not a short time What kind of content do you want to telnet it and write down into your local machine?
-
Maybe the output starts with "/" which is the domain name root directory because of the result using addslashes Could you post out the echo of: $query = "select * from acronymns where ".$searchtype." like '%".$searchterm."%' ORDER BY title "; echo $query; exit;
-
You need to redesign the logic of the script too Do you know what a header() and exit() functions do?
-
http://php.net/manual/en/function.date.php. Try with "l" (L) lower-case
-
What's the name of the second file you've posted above? Where is the script with mysql database credentials and what's the name of it and where do you include it before using all mysql_* functions? EDIT: Take a note that you are using exit() on the line #5!
-
It is correct. Check out whether you have directories with these names in apache web root folder.
-
[Help] Hidden Error when insert data into database
jazzman1 replied to thientanchuong's topic in PHP Coding Help
Your paths to the directories/files are not correct according the print screen file attached to post #4. -
[Help] Hidden Error when insert data into database
jazzman1 replied to thientanchuong's topic in PHP Coding Help
Well, there is no data in this database/table. Can you post out your scripts here ( I don't use the rar archiver). -
How many include("config.php") you have on same document? Start to debug your script using the mysql_error() and error_reporting functions.
-
You should show us your database schema! It should be something like: SELECT movie.name FROM db_name.movie WHERE movie.type='Drama' AND movie.price > 20 ORDER BY movie.price DESC PS: Sorry @dalecosp
-
As far as I know, MySQL doesn't support a full outer join only left and right joins.
-
But i want it to ping all my SEO links You can use the ping command to check the destination IP address or domain names that you want to reach and record the results. To reach the content of your links (seo or not) which belong to some particular domain you would use a telnet command.
-
Have a look at example and apply to your wishes: Next URL's will be matched: The script: <?php if (isset($_POST['Submit'])) { $target = stripslashes($_POST['ip']); $pattern = '~^(https?://)?(([a-zA-Z\d-_.]+\.[a-zA-Z]{2,4})||(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/?$~'; if (!preg_match($pattern, $target, $matches)) { echo '<pre>ERROR: You have entered an invalid IP or domain name</pre>'; } else { // Determine OS and execute the ping command. if (stristr(php_uname('s'), 'Windows NT')) { $cmd = shell_exec('ping ' . $matches[2]); echo '<pre>' . $cmd . '</pre>'; } else { $cmd = shell_exec('ping -c 4 ' . $matches[2]); echo '<pre>' . $cmd . '</pre>'; } } } ?> <h2>Ping Command Execution</h2> <p>Enter an IP address or domain name below:</p> <form name="ping" action="#" method="post"> <input type="text" name="ip" size="30"> <input type="submit" value="Go!" name="Submit"> </form> Results: